-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PM-1376 - Add workflow to publish lists to S3 bucket
- Loading branch information
1 parent
eac5de1
commit ed46998
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Publish network lists | ||
on: | ||
push: | ||
branches: [main] | ||
jobs: | ||
publishing: | ||
runs-on: minafoundation-default-runners | ||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/[email protected] | ||
- name: ⚙️ Set environment variables | ||
run: | | ||
echo "AWS_REGION=$AWS_REGION" >> $GITHUB_ENV | ||
echo "DEPLOYMENT_ROLE_NAME=$DEPLOYMENT_ROLE_NAME" >> $GITHUB_ENV | ||
echo "AWS_ROLE_DURATION_SECONDS=$AWS_ROLE_DURATION_SECONDS" >> $GITHUB_ENV | ||
- name: 🔑 Assume role | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: ${{ env.AWS_REGION }} | ||
role-to-assume: ${{ env.DEPLOYMENT_ROLE_NAME }} | ||
role-session-name: ${{ env.DEPLOYMENT_ROLE_NAME }} | ||
role-duration-seconds: ${{ env.AWS_ROLE_DURATION_SECONDS }} | ||
- name: 📰 Publish network lists | ||
run: ./scripts/publish.sh "$MF_SEED_LISTS_BUCKET_NAME" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
MF_SEED_LISTS_BUCKET_NAME="${1}" | ||
|
||
echo aws s3 sync --delete networks/ "s3://${MF_SEED_LISTS_BUCKET_NAME}/networks/" |