Skip to content

fix: no fs attribs

fix: no fs attribs #11

Workflow file for this run

name: Publish to S3
on:
push:
branches:
- main
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_verified-assets
AWS_S3_BUCKET: fuel-prod-verified-assets-origin
AWS_S3_REGION: us-east-1
jobs:
publish-to-s3:
runs-on: ubuntu-latest
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 -r requirements.txt
- name: Generate assets JSON
run: python create_assets_json.py
- name: Create current release zip
run: |
zip -r assets.zip images assets.local.gen.json
printf "@ assets.local.gen.json\n@=assets.json\n" | zipnote -w assets.zip
- name: Sync images to S3
run: s3cmd --no-preserve --delete-removed sync ./images/ s3://${{ env.AWS_S3_BUCKET }}/images/
- name: Upload Assets JSON to S3
run: s3cmd --no-preserve put ./assets.cdn.gen.json s3://${{ env.AWS_S3_BUCKET }}/assets.json
- name: Upload Assets ZIP to S3
run: s3cmd --no-preserve put ./assets.zip s3://${{ env.AWS_S3_BUCKET }}/latest.zip
- name: Upload Assets ZIP as GitHub artifact
uses: actions/upload-artifact@v4
with:
name: latest-assets.zip
path: assets.zip