Skip to content

Release / chore: rename keyserver to keys-server in strings (#115) #5

Release / chore: rename keyserver to keys-server in strings (#115)

Release / chore: rename keyserver to keys-server in strings (#115) #5

name: ⚡ Release
run-name: 'Release / ${{ github.event.head_commit.message }}'
on:
push:
branches:
- master
paths-ignore:
- '.github/**'
- 'docs/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- 'justfile'
- 'rustfmt.toml'
- '.editorconfig'
- '.pre-commit-config.yaml'
- '.terraformignore'
- '.env.example'
concurrency: deploy
permissions:
contents: write
id-token: write
packages: write
jobs:
# We skip the CI part here since it must have already run thanks to branch protection.
paths_filter:
name: Paths Filter
runs-on:
group: ${{ vars.RUN_GROUP }}
outputs:
infra: ${{ steps.filter.outputs.infra }}
app: ${{ steps.filter.outputs.app }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
infra:
- '${{ vars.TF_DIRECTORY }}/**'
app:
- 'src/**'
update_version:
name: Update Version
runs-on:
group: ${{ vars.RUN_GROUP }}
if: ${{ needs.paths_filter.outputs.app == 'true' }}
needs: [paths_filter]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.PAT }}
fetch-depth: 0
- name: Release
id: release
uses: './.github/actions/update-version'
with:
token: ${{ secrets.PAT }}
outputs:
version: ${{ steps.release.outputs.version }}
released_version:
name: Version ➠ ${{ needs.update_version.outputs.version }}
runs-on:
group: ${{ vars.RUN_GROUP }}
needs: [ update_version ]
steps:
- run: echo "Version = ${{ needs.update_version.outputs.version }}"
publish_image-staging:
name: Publish ${{ needs.update_version.outputs.version }} ❱❱ Staging ECR
uses: ./.github/workflows/sub-publish-image.yml
needs: [update_version]
with:
version: ${{ needs.update_version.outputs.version }}
aws-role-arn: ${{ vars.AWS_ROLE_STAGING }}
publish_image-prod:
name: Publish ${{ needs.update_version.outputs.version }} ❱❱ Prod ECR
uses: ./.github/workflows/sub-publish-image.yml
needs: [update_version]
with:
version: ${{ needs.update_version.outputs.version }}
aws-role-arn: ${{ vars.AWS_ROLE_PROD }}
cd:
name: CD
uses: ./.github/workflows/sub-cd.yml
if: ${{ always() && !cancelled() && !failure() }}
needs: [paths_filter, publish_image-staging, publish_image-prod]
secrets: inherit
with:
deploy-infra: ${{ needs.paths_filter.outputs.infra == 'true' }}
deploy-app: ${{ needs.paths_filter.outputs.app == 'true' }}
deploy-prod: true