Skip to content

Commit

Permalink
Merge pull request #5981 from mysteriumnetwork/ci-migration
Browse files Browse the repository at this point in the history
Disable s3 region lookup and ignore deletion error on Actions CI
  • Loading branch information
tzununbekov authored Feb 21, 2024
2 parents 68056b2 + 2bd41a6 commit 4e55638
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true # disable AWS region lookup

jobs:
setup-env:
Expand Down Expand Up @@ -72,8 +73,6 @@ jobs:
if: |
github.ref == 'refs/heads/master' ||
github.ref_type == 'tag'
env:
AWS_EC2_METADATA_DISABLED: true
run: |
source env.sh
go run mage.go -v MakeBucket
Expand Down Expand Up @@ -108,8 +107,9 @@ jobs:
with:
name: env.sh

- name: Setup FPM
- name: Setup Debber and FPM
run: |
go install github.com/debber/debber-v0.3/cmd/debber@latest
sudo apt-get install ruby-dev build-essential
sudo gem i fpm -f
Expand Down Expand Up @@ -152,3 +152,25 @@ jobs:
if: |
github.ref == 'refs/heads/master' ||
github.ref_type == 'tag'
cleanup-env:
runs-on: ubuntu-latest
needs: [release]
if: |
always() &&
(github.ref == 'refs/heads/master' || github.ref_type == 'tag')
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
- uses: actions/download-artifact@v4
with:
name: env.sh

- name: Remove bucket
run: |
source env.sh
go run mage.go -v RemoveBucket || true # ignore if bucket was not available
23 changes: 9 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true

jobs:
release-snapshot:
Expand Down Expand Up @@ -91,20 +92,14 @@ jobs:
name: env.sh
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Remove bucket
env:
AWS_EC2_METADATA_DISABLED: true
- name: Notify UptimeRobot
if: github.ref == 'refs/heads/master'
run: |
if [ "$NIGHTLY_BUILD" = "1" -o "$NIGHTLY_BUILD" = "T" -o "$NIGHTLY_BUILD" = "true" -o "$NIGHTLY_BUILD" = "True" -o "$NIGHTLY_BUILD" = "TRUE" ]; then
curl -so /dev/null -I "$NIGHTLY_UPTIMEROBOT"
fi
- name: PR Avado
run: |
source env.sh
go run mage.go -v RemoveBucket
# - name: Notify UptimeRobot
# if: github.ref == 'refs/heads/master'
# run: |
# if [ "$NIGHTLY_BUILD" = "1" -o "$NIGHTLY_BUILD" = "T" -o "$NIGHTLY_BUILD" = "true" -o "$NIGHTLY_BUILD" = "True" -o "$NIGHTLY_BUILD" = "TRUE" ]; then
# curl -so /dev/null -I "$NIGHTLY_UPTIMEROBOT"
# fi
# - name: PR Avado
# run: |
# source env.sh
# go run mage.go -v CreateAvadoPR
go run mage.go -v CreateAvadoPR

0 comments on commit 4e55638

Please sign in to comment.