fix: add sts support #28
This file contains hidden or 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: Build & Publish | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| IMAGE_NAME: ghcr.io/fuellabs/dr-cla | |
| AWS_ROLE_ARN: arn:aws:iam::024848458133:role/github_oidc_FuelLabs_dr-cla | |
| AWS_ECR_ORG: fuellabs | |
| jobs: | |
| build: | |
| runs-on: warp-ubuntu-latest-x64-4x | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Configure AWS credentials for ECR publishing | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ env.AWS_ROLE_ARN }} | |
| aws-region: us-east-1 # ecr public is only in us-east-1 | |
| - name: Login to Amazon ECR Public | |
| id: login-ecr-public | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| with: | |
| registry-type: public | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # create a unique tag for each build | |
| - name: Set Docker tag | |
| id: date | |
| run: echo "DATE_STAMP=$(date +%s)" > "$GITHUB_ENV" | |
| - name: Build and push Docker images | |
| uses: ./.github/actions/nixpacks | |
| with: | |
| push: true | |
| cache: true | |
| platforms: "linux/amd64,linux/arm64" | |
| cache_tag: ${{ env.IMAGE_NAME }}:cache | |
| tags: | | |
| ${{ env.IMAGE_NAME }}:${{ env.DATE_STAMP }} | |
| ${{ env.IMAGE_NAME }}:latest | |
| - name: Build and push Docker images ECR | |
| uses: ./.github/actions/nixpacks | |
| with: | |
| push: true | |
| cache: false | |
| platforms: "linux/amd64,linux/arm64" | |
| image_name: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.AWS_ECR_ORG }}/${{ github.event.repository.name }} | |
| tags: | | |
| ${{ steps.login-ecr-public.outputs.registry }}/${{ env.AWS_ECR_ORG }}/${{ github.event.repository.name }}:${{ env.DATE_STAMP }} | |
| ${{ steps.login-ecr-public.outputs.registry }}/${{ env.AWS_ECR_ORG }}/${{ github.event.repository.name }}:latest |