diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index e35d10267..a987c4234 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,10 +1,10 @@ -name: Build Docker Image, Push to GHCR +name: Build Docker image, push to GHCR, and trigger redeploy on: push: - # Publish HEAD of main branch as :latest image tag + # Run whenever main branch changes branches: [ "main" ] - # Publish semver tags as named image tags + # ...or whenever a new semver release tag is published tags: [ 'v*.*.*' ] env: @@ -58,3 +58,17 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + + trigger-redeploy: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Send trigger-workflow webhook to maproulette-deploy repository + run: | + curl -L \ + -X POST \ + https://api.github.com/repos/maproulette/maproulette-deploy/dispatches \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -d '{ "event_type": "trigger-workflow" }' diff --git a/.github/workflows/trigger-redeploy.yaml b/.github/workflows/trigger-redeploy.yaml deleted file mode 100644 index be0dffbac..000000000 --- a/.github/workflows/trigger-redeploy.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Trigger Redeploy - -on: - # run whenever a new maproulette/maproulette-frontend package is published to GHCR - registry_package: - types: [ published, updated ] - -jobs: - trigger: - runs-on: ubuntu-latest - - steps: - - name: Send trigger-workflow webhook to maproulette-deploy repository - run: | - curl -L \ - -X POST \ - https://api.github.com/repos/maproulette/maproulette-deploy/dispatches \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -d '{ "event_type": "trigger-workflow" }'