Upgrade variables to latest versions #111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upgrade variables to latest versions | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 1" | |
push: | |
paths: | |
- "scripts/**" | |
- ".github/workflows/upgrade-checks.yml" | |
jobs: | |
mysql: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
check-latest: true | |
- name: Install dependencies | |
run: pip install -r scripts/requirements.txt | |
- id: mysql | |
name: Get latest MySQL version | |
run: python scripts/get_latest_mysql_version.py | |
- name: Set MySQL Version | |
run: python scripts/set_variable_default.py database_version ${{ steps.mysql.outputs.LATEST_VERSION }} | |
- name: Set MySQL Version Module | |
run: python scripts/set_variable_default.py database_version ${{ steps.mysql.outputs.LATEST_VERSION }} modules/database/variables.tf | |
- name: Update terraform docs | |
uses: terraform-docs/gh-actions@main | |
with: | |
working-dir: . | |
output-file: README.md | |
output-method: inject | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
title: "fix: Set MySQL default version to ${{ steps.mysql.outputs.LATEST_VERSION }}" | |
commit-message: "fix: Set MySQL default version to ${{ steps.mysql.outputs.LATEST_VERSION }}" | |
delete-branch: true | |
branch: ci/upgrade-mysql |