-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Map and Notify On Registry Package Update | ||
|
||
on: | ||
registry_package: | ||
types: [updated] | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check for image tag information and valid package name | ||
if: | | ||
github.event.registry_package.package_version.container_metadata.tag.name != '' && | ||
( | ||
github.event.registry_package.name == 'dota' || | ||
github.event.registry_package.name == 'twitch-events' || | ||
github.event.registry_package.name == 'twitch-chat' || | ||
github.event.registry_package.name == 'steam' | ||
) | ||
run: | | ||
# Map package name to UUID | ||
case "${{ github.event.registry_package.name }}" in | ||
"dota") UUID="esgckgc" ;; | ||
"twitch-events") UUID="aopskdk" ;; | ||
"twitch-chat") UUID="gahgag" ;; | ||
"steam") UUID="asldja" ;; | ||
esac | ||
# Use curl to call a GET webhook with the mapped UUID and API key from secrets | ||
curl -X GET -H "Authorization: Bearer ${{ secrets.COOLIFY_API_KEY }}" "https://${{ secrets.COOLIFY_HOST }}/api/v1/deploy?uuid=${UUID}&force=false" |