Skip to content

chore(deps): lock file maintenance (#1647) #189

chore(deps): lock file maintenance (#1647)

chore(deps): lock file maintenance (#1647) #189

Workflow file for this run

name: Merge
on:
push:
branches: [main]
paths-ignore:
- '*.md'
- '.graphics/**'
- '.github/**'
- '!.github/workflows/merge.yml'
jobs:
vars:
name: Output Semver and PR Number
outputs:
pr: ${{ steps.pr-number.outputs.pr }}
tag: ${{ steps.changelog.outputs.tag }}
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
# Outputs semver as steps.id.outputs.tag
- name: Conventional Changelog Update
uses: TriPSs/conventional-changelog-action@v4
id: changelog
with:
git-branch: refs/heads/${{ github.event.repository.default_branch }}
git-push: "false"
github-token: ${{ github.token }}
skip-commit: "true"
skip-on-empty: "false"
skip-version-file: "true"
# Create and push semver tag
- name: Create Tags
run: |
echo git tag ${{ steps.changelog.outputs.tag }}
echo git push origin --tag
# Get PR number, assmuing a PR was merged
- name: Get PR Number
id: pr-number
run: |
# Scrub last commit message for PR number
PR_NO=$(echo "${{ github.event.head_commit.message }}" | cut -d'#' -f 2 | cut -d')' -f 1)
# Echos
echo -e "pr=${PR_NO}"
echo -e "Last commit message: \n\t${{ github.event.head_commit.message }}"
# Send to GitHub Output
echo "pr=${PR_NO}" >> $GITHUB_OUTPUT
# Add tag number and latest tags to PR image
retags:
name: Retag Images
needs: [vars]
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
package: [migrations, backend, frontend]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ needs.vars.outputs.pr }}
tags: |
latest
${{ needs.vars.outputs.tag }}
deploy-test:
name: Deploy (test)
needs: [vars]
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
environment: test
tag: ${{ needs.vars.outputs.pr }}
release: test
integration-e2e:
name: Integration and E2E Tests
needs: [deploy-test]
uses: ./.github/workflows/.tests.yml
with:
target: test
deploy-prod:
name: Deploy (prod)
needs: [integration-e2e, vars]
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
environment: prod
tag: ${{ needs.vars.outputs.pr }}
release: prod
promote:
name: Promote Images
needs: [deploy-prod, vars]
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
package: [migrations, backend, frontend]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ needs.vars.outputs.pr }}
tags: prod