🏷️ Release #5
Workflow file for this run
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: 🏷️ Release | ||
| on: | ||
| release: | ||
| types: | ||
| - created | ||
| - edited | ||
| permissions: {} | ||
| jobs: | ||
| build: | ||
| name: 🏗️ Build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| environment: staging | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - env: | ||
| RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | ||
| RELEASE_NAME: ${{ github.event.release.name }} | ||
| RELEASE_BODY: ${{ github.event.release.body }} | ||
| run: | | ||
| cat <<EOF >> $GITHUB_STEP_SUMMARY | ||
| Name: ${RELEASE_NAME} | ||
| Tag: ${RELEASE_TAG_NAME} | ||
| Changelog: | ||
| ${RELEASE_BODY} | ||
| EOF | ||
| - id: build | ||
| env: | ||
| RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | ||
| DOCKER_REPO: ${{ vars.DOCKERHUB_REPO }} | ||
| DOCKER_USERNAME: ${{ vars.DOCKERHUB_USERNAME }} | ||
| run: | | ||
| ./build.sh prod "${RELEASE_TAG_NAME}" /tmp/build-metadata.json | ||
| IMAGE_ID=$(jq -r '."containerimage.digest"' /tmp/build-metadata.json) | ||
| echo "IMAGE_ID=${IMAGE_ID}" >> $GITHUB_OUTPUT | ||
| echo "Image ID: `${IMAGE_ID}`" >> $GITHUB_STEP_SUMMARY | ||
| outputs: | ||
| IMAGE_ID: ${{ steps.build.outputs.IMAGE_ID }} | ||
| deploy-alpha: | ||
| name: Deploy to alpha | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| needs: [build] | ||
| environment: staging | ||
| steps: | ||
| - env: | ||
| IMAGE_ID: ${{ jobs.build.ouputs.IMAGE_ID }} | ||
|
Check failure on line 51 in .github/workflows/release.yml
|
||
| RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| # TODO: Switch to using IMAGE_ID | ||
| ./deploy.sh staging staging "${RELEASE_TAG_NAME}" alpha | ||
| deploy-beta: | ||
| name: Deploy to beta | ||
| runs-on: ubuntu-latest | ||
| needs: [deploy-alpha] | ||
| timeout-minutes: 30 | ||
| environment: prod | ||
| steps: | ||
| - env: | ||
| RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| ./deploy.sh prod nbg1 "${RELEASE_TAG_NAME}" beta | ||
| deploy-blue: | ||
| name: Deploy to blue | ||
| runs-on: ubuntu-latest | ||
| needs: [deploy-alpha] | ||
| timeout-minutes: 30 | ||
| environment: prod | ||
| steps: | ||
| - env: | ||
| RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| ./deploy.sh prod nbg1 "${RELEASE_TAG_NAME}" blue | ||
| deploy-green: | ||
| name: Deploy to green | ||
| runs-on: ubuntu-latest | ||
| needs: [deploy-alpha] | ||
| timeout-minutes: 30 | ||
| environment: prod | ||
| steps: | ||
| - env: | ||
| RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| ./deploy.sh prod nbg1 "${RELEASE_TAG_NAME}" green | ||