Merge pull request #161 from cordada/release/v1.4.0 #317
Workflow file for this run
This file contains 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
# GitHub Actions Workflow for Continuous Integration and Continuous Delivery | |
name: CI/CD | |
on: | |
push: | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
PRODUCTION_VCS_REF: refs/heads/master # Keep in sync with the branch list in `jobs.release.if`. | |
STAGING_VCS_REF: refs/heads/develop # Keep in sync with the branch list in `jobs.release.if`. | |
jobs: | |
# -----BEGIN Workflow Configuration Job----- | |
workflow_config: | |
name: Workflow Configuration | |
runs-on: ubuntu-22.04 | |
outputs: | |
PRODUCTION_VCS_REF: ${{ env.PRODUCTION_VCS_REF }} | |
STAGING_VCS_REF: ${{ env.STAGING_VCS_REF }} | |
steps: | |
- run: "true" | |
# -----END Workflow Configuration Job----- | |
# -----BEGIN CI Job----- | |
ci: | |
name: CI | |
needs: | |
- workflow_config | |
uses: ./.github/workflows/ci.yaml | |
secrets: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
# -----END CI Job----- | |
# -----BEGIN Release Job----- | |
release: | |
name: Release | |
if: ${{ github.ref == needs.workflow_config.outputs.PRODUCTION_VCS_REF || github.ref == needs.workflow_config.outputs.STAGING_VCS_REF }} | |
needs: | |
- ci | |
- workflow_config | |
uses: ./.github/workflows/release.yaml | |
with: | |
create_git_tag_and_github_release: ${{ github.ref == needs.workflow_config.outputs.PRODUCTION_VCS_REF }} | |
# -----END Release Job----- | |
# -----BEGIN Deploy Job----- | |
deploy: | |
name: Deploy | |
if: ${{ github.ref == needs.workflow_config.outputs.PRODUCTION_VCS_REF }} | |
needs: | |
- release | |
- workflow_config | |
uses: ./.github/workflows/deploy.yaml | |
with: | |
deploy_env: prod | |
artifacts_path: ${{ needs.release.outputs.artifacts_path }} | |
secrets: inherit | |
# -----END Deploy Job----- |