Skip to content

Update dependency aquaproj/aqua to v2.17.0 (.github/workflows) #129

Update dependency aquaproj/aqua to v2.17.0 (.github/workflows)

Update dependency aquaproj/aqua to v2.17.0 (.github/workflows) #129

Workflow file for this run

---
name: apply
on:
push:
branches: [main]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TFACTION_IS_APPLY: 'true'
permissions:
id-token: write
contents: read
issues: read # this is required to `gh pr list`'s `-l` option
pull-requests: write
jobs:
setup:
runs-on: ubuntu-latest
outputs:
tfmigrate_targets: ${{ steps.list-targets.outputs.tfmigrate_targets }}
terraform_targets: ${{ steps.list-targets.outputs.terraform_targets }}
steps:
- uses: actions/checkout@v3
- uses: aquaproj/[email protected]
with:
aqua_version: v2.17.0
- uses: suzuki-shunsuke/tfaction/[email protected]
id: list-targets
tfmigrate-apply:
name: "tfmigrate-apply (${{matrix.target.target}})"
runs-on: ${{matrix.target.runs_on}}
needs: setup
# if services is empty, the build job is skipped
if: "join(fromJSON(needs.setup.outputs.tfmigrate_targets), '') != ''"
strategy:
fail-fast: false
matrix:
target: ${{fromJSON(needs.setup.outputs.tfmigrate_targets)}}
env:
TFACTION_TARGET: ${{matrix.target.target}}
TFACTION_JOB_TYPE: tfmigrate
steps:
- uses: actions/checkout@v3
# We recommend using GitHub App Token instead of personal access token,
# but in this getting started let's use personal access token.
# - name: Generate token
# id: generate_token
# uses: tibdex/github-app-token@v1
# with:
# app_id: ${{ secrets.APP_ID }}
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: aquaproj/[email protected]
with:
aqua_version: v2.17.0
- uses: suzuki-shunsuke/tfaction/[email protected]
with:
secrets: ${{ toJSON(secrets) }}
- uses: suzuki-shunsuke/tfaction/[email protected]
id: setup
with:
github_app_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ssh_key: ${{ secrets.TERRAFORM_PRIVATE_MODULE_SSH_KEY }} # This isn't needed if you don't use SSH key to checkout private Terraform Modules
- uses: suzuki-shunsuke/tfaction/[email protected]
with:
github_app_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- uses: suzuki-shunsuke/tfaction/[email protected]
if: failure()
with:
github_app_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
terraform-apply:
name: "terraform-apply (${{matrix.target.target}})"
runs-on: ${{matrix.target.runs_on}}
needs: setup
# if services is empty, the build job is skipped
if: "join(fromJSON(needs.setup.outputs.terraform_targets), '') != ''"
strategy:
fail-fast: false
matrix:
target: ${{fromJSON(needs.setup.outputs.terraform_targets)}}
env:
TFACTION_TARGET: ${{matrix.target.target}}
TFACTION_JOB_TYPE: terraform
steps:
- uses: actions/checkout@v3
# We recommend using GitHub App Token instead of personal access token,
# but in this getting started let's use personal access token.
# - name: Generate token
# id: generate_token
# uses: tibdex/github-app-token@v1
# with:
# app_id: ${{ secrets.APP_ID }}
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: aquaproj/[email protected]
with:
aqua_version: v2.17.0
- uses: suzuki-shunsuke/tfaction/[email protected]
with:
secrets: ${{ toJSON(secrets) }}
- uses: suzuki-shunsuke/tfaction/[email protected]
id: setup
with:
github_app_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ssh_key: ${{ secrets.TERRAFORM_PRIVATE_MODULE_SSH_KEY }} # This isn't needed if you don't use SSH key to checkout private Terraform Modules
- uses: suzuki-shunsuke/tfaction/[email protected]
with:
github_app_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- uses: suzuki-shunsuke/tfaction/[email protected]
if: failure()
with:
github_app_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}