publish #52
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: publish | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| identifier: | |
| description: identifier | |
| required: true | |
| permissions: | |
| id-token: write | |
| contents: read | |
| actions: write | |
| jobs: | |
| start_deploy: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Add Mask | |
| run: | | |
| echo "::add-mask::${{ secrets.ACCOUNT_ID }}" | |
| - uses: actions/checkout@v4 | |
| - uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.ARN_ROLE_PUBLISHER }} | |
| aws-region: ${{ vars.BASE_AWS_REGION }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: .python-version | |
| - run: | | |
| pip install "poetry<3.0" | |
| poetry install --only main | |
| - run: make publish-start-publish | |
| env: | |
| IDENTIFIER: ${{ github.event.inputs.identifier }} | |
| TABLE_NAME: ${{ vars.TABLE_NAME }} | |
| URL_ACTION_RUN: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: publish-layer-json | |
| path: layer.json | |
| build: | |
| runs-on: ${{ matrix.runner }} | |
| needs: | |
| - start_deploy | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| max_concurrency: [2] | |
| index: [0, 1] | |
| runner: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| steps: | |
| - name: Add Mask | |
| run: | | |
| echo "::add-mask::${{ secrets.ACCOUNT_ID }}" | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: .python-version | |
| - run: | | |
| pip install "poetry<3.0" | |
| poetry install --only main | |
| - name: tmp | |
| run: | | |
| echo $ACTIONS_URL | |
| echo "identifier: ${{ github.event.inputs.identifier }}" | |
| echo "max_concurrency: ${{ matrix.max_concurrency }}" | |
| echo "index: ${{ matrix.index }}" | |
| echo "runner: ${{ matrix.runner }}" | |
| env: | |
| ACTIONS_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-layer-json | |
| - run: cat layer.json | |
| publish: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| region: | |
| - af-south-1 | |
| - ap-south-2 | |
| - ap-southeast-3 | |
| - ap-southeast-4 | |
| - ap-southeast-5 | |
| - ap-southeast-7 | |
| - ca-west-1 | |
| - eu-central-2 | |
| - eu-south-1 | |
| - eu-south-2 | |
| - il-central-1 | |
| - me-central-1 | |
| - me-south-1 | |
| - mx-central-1 | |
| - ap-northeast-1 | |
| - ap-northeast-2 | |
| - ap-northeast-3 | |
| - ap-south-1 | |
| - ap-southeast-1 | |
| - ap-southeast-2 | |
| - ca-central-1 | |
| - eu-central-1 | |
| - eu-north-1 | |
| - eu-west-1 | |
| - eu-west-2 | |
| - eu-west-3 | |
| - sa-east-1 | |
| - us-east-1 | |
| - us-east-2 | |
| - us-west-1 | |
| - us-west-2 | |
| concurrency: | |
| cancel-in-progress: false | |
| group: publish-in-${{ matrix.region }} | |
| steps: | |
| - name: Add Mask | |
| run: | | |
| echo "::add-mask::${{ secrets.ACCOUNT_ID }}" | |
| - uses: actions/checkout@v4 | |
| - uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.ARN_ROLE_PUBLISHER }} | |
| aws-region: ${{ matrix.region }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: .python-version | |
| - run: | | |
| pip install "poetry<3.0" | |
| poetry install --only main | |
| - name: tmp | |
| run: | | |
| echo $ACTIONS_URL | |
| echo "identifier: ${{ github.event.inputs.identifier }}" | |
| echo "region: ${{ matrix.region }}" | |
| env: | |
| ACTIONS_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| finish_deploy: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - publish | |
| steps: | |
| - name: Add Mask | |
| run: | | |
| echo "::add-mask::${{ secrets.ACCOUNT_ID }}" | |
| - uses: actions/checkout@v4 | |
| - uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.ARN_ROLE_PUBLISHER }} | |
| aws-region: ${{ vars.BASE_AWS_REGION }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: .python-version | |
| - run: | | |
| pip install "poetry<3.0" | |
| poetry install --only main | |
| - run: make publish-finish-publish | |
| env: | |
| IDENTIFIER: ${{ github.event.inputs.identifier }} | |
| TABLE_NAME: ${{ vars.TABLE_NAME }} | |
| call_generate: | |
| needs: | |
| - finish_deploy | |
| uses: ./.github/workflows/generate.yml | |
| secrets: inherit | |
| with: | |
| identifier: ${{ github.event.inputs.identifier }} | |
| notify-failed: | |
| runs-on: ubuntu-24.04 | |
| if: failure() | |
| needs: | |
| - start_deploy | |
| - publish | |
| - finish_deploy | |
| steps: | |
| - name: Add Mask | |
| run: | | |
| echo "::add-mask::${{ secrets.ACCOUNT_ID }}" | |
| - uses: actions/checkout@v4 | |
| - uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.ARN_ROLE_PUBLISHER }} | |
| aws-region: ${{ vars.BASE_AWS_REGION }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: .python-version | |
| - run: | | |
| pip install "poetry<3.0" | |
| poetry install --only main | |
| - run: make update-failed | |
| env: | |
| IDENTIFIER: ${{ github.event.inputs.identifier }} | |
| TABLE_NAME: ${{ vars.TABLE_NAME }} | |
| URL_ACTION_RUN: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| EVENT_BUS_NAME: ${{ vars.EVENT_BUS_NAME }} | |