-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bcee5c4
commit fae5997
Showing
2 changed files
with
53 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,43 @@ | ||
name: Publish to S3 | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
GIT_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
GIT_REPO_OWNER: ${{ github.repository_owner }} | ||
GIT_REPO: ${{ github.repository }} | ||
AWS_ROLE_ARN: arn:aws:iam::024848458133:role/github_oidc_FuelLabs_chain-configuration | ||
AWS_S3_BUCKET: fuel-prod-chain-configuration-assets-origin | ||
AWS_S3_REGION: us-east-1 | ||
|
||
jobs: | ||
publish-to-s3: | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ env.AWS_ROLE_ARN }} | ||
aws-region: ${{ env.AWS_S3_REGION }} | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
|
||
- name: Install s3cmd tool | ||
run: pip install s3cmd | ||
|
||
- name: Sync files to S3 | ||
run: s3cmd sync —exclude '.git*' --delete-removed ./ s3://${{ env.AWS_S3_BUCKET }}/ |
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,10 @@ | ||
.DS_Store | ||
.terraform | ||
*.tfstate* | ||
*.terraform.lock.hcl* | ||
.vscode | ||
.envrc | ||
.direnv | ||
.cov | ||
.idea | ||
.env |