diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index f3c5e8b..adf9926 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -17,3 +17,18 @@ jobs: uses: ipdxco/unified-github-workflows/.github/workflows/releaser.yml@v1.0 secrets: UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }} + # The release above tags with GITHUB_TOKEN unless UCI_GITHUB_TOKEN is set, and + # a tag pushed with GITHUB_TOKEN starts no on.push workflows, so docker.yml's + # tag trigger never fires. workflow_dispatch is the documented exception. + publish-image: + needs: [releaser] + if: fromJSON(needs.releaser.outputs.json)['version.json'] + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Start the image build for the new tag + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ fromJSON(needs.releaser.outputs.json)['version.json'].version }} + run: gh workflow run docker.yml --repo "$GITHUB_REPOSITORY" --ref "$TAG" diff --git a/README.md b/README.md index e70e290..6598f3c 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ For self-hosting, run the [prebuilt Docker image](#docker). 1. Updates [`CHANGELOG.md`](CHANGELOG.md) with entries for the current release 2. Updates the [`version.json`](./version.json) file 2. Once the release checker creates a draft release, copy-paste the changelog into the draft -3. Merge the PR; the release workflow tags and publishes automatically +3. Merge the PR; the release workflow tags, publishes the GitHub release, and starts the [`docker.yml`](.github/workflows/docker.yml) build that pushes `ghcr.io/ipni/needle:vX.Y.Z` ## License