Skip to content

Commit

Permalink
Combine docker-publish and trigger-redeploy CI workflows (#2504)
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-low authored Dec 17, 2024
1 parent 27e2819 commit c8fb6f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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" }'
20 changes: 0 additions & 20 deletions .github/workflows/trigger-redeploy.yaml

This file was deleted.

0 comments on commit c8fb6f5

Please sign in to comment.