diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 615b2af0..d8d2ba06 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,7 @@ #! Main CI Specification for DataHaven Repository +#! +#! This workflow runs validation checks on pull requests. +#! For main branch releases, see release.yml name: CI @@ -6,7 +9,6 @@ on: workflow_dispatch: push: branches: - - main - perm-* pull_request: branches: [main] @@ -60,13 +62,6 @@ jobs: with: binary-hash: ${{ needs.build-operator.outputs.binary-hash }} - docker-build-release: - if: github.ref == 'refs/heads/main' - uses: ./.github/workflows/task-docker-release.yml - secrets: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - moonwall-tests: needs: [build-operator] uses: ./.github/workflows/task-moonwall-tests.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..854cdeed --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +#! Release workflow for DataHaven Repository +#! +#! This workflow runs when code is merged to main, publishing Docker images +#! to Docker Hub. Validation checks are handled by CI.yml on pull requests. +#! +#! Since PRs require: +#! 1. Branch to be up-to-date with main before merging +#! 2. All CI checks to pass +#! Re-running validation on main would be redundant. + +name: Release + +on: + workflow_dispatch: + push: + branches: + - main + +permissions: + contents: read + +concurrency: + group: release-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + docker-build-release: + uses: ./.github/workflows/task-docker-release.yml + secrets: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}