Update Stack #33
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: Update Stack | |
on: | |
workflow_dispatch: | |
inputs: | |
stack: | |
type: string | |
required: true | |
environment: | |
type: string | |
required: true | |
image: | |
type: string | |
required: true | |
tag: | |
type: string | |
required: true | |
jobs: | |
update-stack: | |
name: Update Stack File | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: poetry | |
- run: poetry install | |
- name: Update stack | |
run: poetry run python _tools/update-stack.py '${{ inputs.stack }}' '${{ inputs.environment }}' '${{ inputs.image }}' '${{ inputs.tag }}' | |
- name: Push changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '[email protected]' | |
git commit -am 'Update ${{ inputs.stack }} ${{ inputs.environment }}' | |
git push |