Fail closed on server nodes without HTTP control roles #44
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: | |
| push: | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Docker tag override (for manual runs, e.g. 0.0.1-test)' | |
| required: false | |
| default: '' | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| DOCKERHUB_IMAGE: durableworkflow/server | |
| GHCR_IMAGE: ghcr.io/durable-workflow/server | |
| jobs: | |
| publish: | |
| name: Build and push Docker image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract image metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: | | |
| ${{ env.DOCKERHUB_IMAGE }} | |
| ${{ env.GHCR_IMAGE }} | |
| # On a release tag like 0.1.0, produces tags: | |
| # durableworkflow/server:0.1.0 | |
| # durableworkflow/server:0.1 | |
| # durableworkflow/server:0 | |
| # durableworkflow/server:latest | |
| # ghcr.io/durable-workflow/server:0.1.0 | |
| # ghcr.io/durable-workflow/server:0.1 | |
| # ghcr.io/durable-workflow/server:0 | |
| # ghcr.io/durable-workflow/server:latest | |
| # workflow_dispatch with an input uses that as a single tag. | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} | |
| type=raw,value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' }} | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| # Automatically detect the latest workflow package pre-release tag | |
| # This allows you to tag workflow releases (2.0.0-alpha.2, etc) and have | |
| # server builds automatically pick them up without manual workflow edits. | |
| - name: Get latest workflow package version | |
| id: workflow | |
| run: | | |
| # Fetch latest pre-release tag from workflow repo (2.0.0-alpha.x, 2.0.0-beta.x) | |
| LATEST_TAG=$(git ls-remote --tags --refs --sort=v:refname https://github.com/durable-workflow/workflow.git \ | |
| | grep -E 'refs/tags/2\.0\.0-(alpha|beta)\.' \ | |
| | tail -1 \ | |
| | sed 's/.*refs\/tags\///') | |
| # Fallback to v2 branch if no pre-release tags exist | |
| if [ -z "$LATEST_TAG" ]; then | |
| LATEST_TAG="v2" | |
| fi | |
| echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT | |
| echo "Using workflow package version: $LATEST_TAG" | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| provenance: false | |
| build-args: | | |
| WORKFLOW_PACKAGE_REF=${{ steps.workflow.outputs.tag }} |