DN-3426 feat: Add deadlines for steps #172
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: Build and deploy - PR | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: self-hosted | |
| environment: | |
| name: pr-${{ github.event.number }} | |
| url: https://workflow-api-pr-${{ github.event.number }}.datanose.nl/ | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build and deploy | |
| env: | |
| PR_NUMBER: ${{ github.event.number }} | |
| UPDATER_SECRET: ${{ secrets.UPDATER_SECRET_DN }} | |
| run: | | |
| set -euxo pipefail | |
| TAG="pr-${PR_NUMBER}" | |
| docker build -f UvA.Workflow.Api/Dockerfile -t "datanosecr.azurecr.io/workflow-api:${TAG}" . | |
| docker push "datanosecr.azurecr.io/workflow-api:${TAG}" | |
| VERSION=$(date "+1.0.%Y%m%d%H%M%S") | |
| helm package --version "${VERSION}" --app-version "${VERSION}" Deployment/workflow-api-pr | |
| helm push "workflow-api-pr-${VERSION}.tgz" oci://datanosecr.azurecr.io/helm | |
| curl --fail --no-progress-meter "https://api-v2-tst.datanose.nl/gitops-updater?name=workflow-api-pr&secret=${UPDATER_SECRET}&version=${VERSION}&id=${PR_NUMBER}" |