fix: allow version 6 addresses (#153) #99
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: 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}} | |
fetch-depth: 0 | |
- 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: matttrach/nix-installer-action@main | |
if: steps.release-please.outputs.pr | |
- name: Check for Leftovers | |
if: steps.release-please.outputs.pr | |
shell: 'nix develop --ignore-environment --extra-experimental-features nix-command --extra-experimental-features flakes --keep HOME --keep SSH_AUTH_SOCK --keep GITHUB_TOKEN --keep ZONE --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 --command bash -e {0}' | |
run: | | |
for region in us-west-1 us-west-2 us-east-1 us-east-2; do | |
echo -n "leftovers in $region: " | |
response="$( \ | |
leftovers -d --iaas=aws --aws-region="$region" --filter="Owner:terraform-ci" | \ | |
grep -v 'AccessDenied' | \ | |
grep -v 'status code' | \ | |
grep -v 'UnauthorizedOperation' \ | |
|| true | |
)" | |
if [ -n "$response" ]; then | |
echo "found leftovers: " | |
echo "$response" | |
echo "please clean up leftovers before release testing" | |
exit 1 | |
else | |
echo "none found" | |
fi | |
done | |
- name: Run Tests | |
if: steps.release-please.outputs.pr | |
shell: 'nix develop --ignore-environment --extra-experimental-features nix-command --extra-experimental-features flakes --keep HOME --keep SSH_AUTH_SOCK --keep GITHUB_TOKEN --keep GITHUB_OWNER --keep ZONE --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 --command bash -e {0}' | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
GITHUB_OWNER: rancher | |
IDENTIFIER: ${{github.run_id}} | |
ZONE: ${{secrets.ZONE}} | |
run: | | |
chmod +x ${{github.workspace}}/run_tests.sh | |
${{github.workspace}}/run_tests.sh | |
cd ${{github.workspace}} | |
- 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 }} |