Skip to content

fix: redirect status to log (#117) #64

fix: redirect status to log (#117)

fix: redirect status to log (#117) #64

Workflow file for this run

name: release
on:
push:
branches:
- main
env:
AWS_REGION: us-west-1
AWS_ROLE: arn:aws:iam::270074865685:role/terraform-module-ci-test
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
permissions: write-all
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release-please
with:
release-type: terraform-module
- uses: peter-evans/create-or-update-comment@v4
name: 'Remind to wait'
if: steps.release-please.outputs.pr
with:
issue-number: ${{ fromJson(steps.release-please.outputs.pr).number }}
body: |
Please make sure e2e tests pass before merging this PR!
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- uses: actions/checkout@v4
if: steps.release-please.outputs.pr
with:
token: ${{secrets.GITHUB_TOKEN}}
- uses: DeterminateSystems/nix-installer-action@main
if: steps.release-please.outputs.pr
- uses: nicknovitski/[email protected]
if: steps.release-please.outputs.pr
with:
arguments: |
--ignore-environment \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
--keep HOME \
--keep SSH_AUTH_SOCK \
--keep GITHUB_TOKEN \
--keep AWS_ROLE \
--keep AWS_REGION \
--keep AWS_DEFAULT_REGION \
--keep AWS_ACCESS_KEY_ID \
--keep AWS_SECRET_ACCESS_KEY \
--keep AWS_SESSION_TOKEN \
--keep UPDATECLI_GPGTOKEN \
--keep UPDATECLI_GITHUB_TOKEN \
--keep UPDATECLI_GITHUB_ACTOR \
--keep GPG_SIGNING_KEY \
--keep NIX_ENV_LOADED \
--keep TERM \
${{ github.workspace }}
- uses: aws-actions/configure-aws-credentials@v4
if: steps.release-please.outputs.pr
with:
role-to-assume: ${{env.AWS_ROLE}}
role-session-name: ${{github.job}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}
aws-region: ${{env.AWS_REGION}}
- uses: actions/cache/restore@v4
id: cache-terraform-restore
if: steps.release-please.outputs.pr
with:
path: ${{ github.workspace }}/.terraform
key: terraform-${{hashFiles('**/versions.tf','**/main.tf')}}
- run: terraform init -upgrade
if: steps.release-please.outputs.pr
- uses: actions/cache/save@v4
id: cache-terraform-save
if: steps.release-please.outputs.pr
with:
path: ${{ github.workspace }}/.terraform
key: ${{ steps.cache-terraform-restore.outputs.cache-primary-key }}
- run: go version && cd ${{github.workspace}}/tests && go test -v -timeout=40m -parallel=10 && cd ${{github.workspace}}
if: steps.release-please.outputs.pr
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_OWNER: rancher
IDENTIFIER: ${{github.job}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}
- uses: peter-evans/create-or-update-comment@v4
name: 'Report Success'
if: steps.release-please.outputs.pr
with:
issue-number: ${{ fromJson(steps.release-please.outputs.pr).number }}
body: |
End to End Tests Passed!
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}