Skip to content

Merge pull request #208 from codeforjapan/feat/add-skip-logic #13

Merge pull request #208 from codeforjapan/feat/add-skip-logic

Merge pull request #208 from codeforjapan/feat/add-skip-logic #13

Workflow file for this run

name: Release to Production
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
id-token: write
contents: read
actions: write
concurrency:
group: cdk-prd
cancel-in-progress: false
jobs:
release:

Check failure on line 18 in .github/workflows/release-prd.yml

View workflow run for this annotation

GitHub Actions / Release to Production

Invalid workflow file

The workflow is not valid. .github/workflows/release-prd.yml (Line: 18, Col: 3): Error calling workflow 'codeforjapan/BirdXplorer/.github/workflows/_release.yaml@def6866d8c6f083def10cc577cb0fa24f30aae35'. The workflow is requesting 'artifact-metadata: write, attestations: write, checks: write, contents: write, deployments: write, discussions: write, issues: write, models: read, packages: write, pages: write, pull-requests: write, repository-projects: write, statuses: write, security-events: write', but is only allowed 'ar[...]
uses: ./.github/workflows/_release.yaml
secrets: inherit
build-push-api:
needs: release
if: needs.release.outputs.created == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ap-northeast-1
- uses: aws-actions/amazon-ecr-login@v2
id: login-ecr
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
context: ./api
file: ./api/Dockerfile.prd
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/birdxplorer-api:${{ needs.release.outputs.tag_name }}
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
build-push-etl:
needs: release
if: needs.release.outputs.created == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
lambda:
- { dockerfile: Dockerfile.extract, repository: birdxplorer-etl }
- { dockerfile: Dockerfile.language_detect, repository: birdxplorer-etl-lang }
- { dockerfile: Dockerfile.note_transform, repository: birdxplorer-etl-note-transform }
- { dockerfile: Dockerfile.topic_detect, repository: birdxplorer-etl-topic }
- { dockerfile: Dockerfile.postlookup, repository: birdxplorer-etl-postlookup }
- { dockerfile: Dockerfile.db_writer, repository: birdxplorer-etl-db-writer }
- { dockerfile: Dockerfile.note_status_update, repository: birdxplorer-etl-note-status-update }
- { dockerfile: Dockerfile.post_transform, repository: birdxplorer-etl-post-transform }
steps:
- uses: actions/checkout@v5
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ap-northeast-1
- uses: aws-actions/amazon-ecr-login@v2
id: login-ecr
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
context: ./
file: ./etl/${{ matrix.lambda.dockerfile }}
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/${{ matrix.lambda.repository }}:${{ needs.release.outputs.tag_name }}
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
deploy-cdk-prd:
needs: [release, build-push-api, build-push-etl]
if: needs.release.outputs.created == 'true'
uses: ./.github/workflows/_deploy.yaml
with:
deploy-env: prd
image-tag: ${{ needs.release.outputs.tag_name }}
verify-images: >
birdxplorer-api,
birdxplorer-etl,
birdxplorer-etl-lang,
birdxplorer-etl-note-transform,
birdxplorer-etl-topic,
birdxplorer-etl-postlookup,
birdxplorer-etl-db-writer,
birdxplorer-etl-note-status-update,
birdxplorer-etl-post-transform
stacks: "prdbird-xplorerStack prdbird-xplorerApiStack"
secrets: inherit