Skip to content

Mess with envars

Mess with envars #159

Workflow file for this run

name: Merge
on:
push: #[${{ github.event.repository.default_branch }}]
env:
tag: ${{ github.event.number }}
jobs:
semver:
name: Semantic Version and Tag
outputs:
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 tag and output semver
- name: Create Tags
run: |
echo git tag ${{ steps.changelog.outputs.tag }}
echo git push origin --tag
# Add tag number and latest tags to PR image
retags:
name: Retag Images
needs: [semver]
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: ${{ github.event.number }}
tags: |
latest
${{ needs.semver.outputs.tag }}
deploy-test:
name: Deploy (test)
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
environment: test
tag: ${{ env.tag }}

Check failure on line 63 in .github/workflows/merge.yml

View workflow run for this annotation

GitHub Actions / Merge

Invalid workflow file

The workflow is not valid. .github/workflows/merge.yml (Line: 63, Col: 12): Unrecognized named-value: 'env'. Located at position 1 within expression: env.tag .github/workflows/merge.yml (Line: 80, Col: 12): Unrecognized named-value: 'env'. Located at position 1 within expression: env.tag
target: 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]
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
environment: prod
tag: ${{ env.tag }}
target: prod
promote:
name: Promote Images
needs: [deploy-prod]
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: ${{ env.tag }}
tags: prod