Skip to content

Commit

Permalink
Fix bug in login functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Dec 25, 2023
1 parent 4d347be commit 71c7c94
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ jobs:
environment: prod
permissions:
packages: write
env:
IMAGES: "twitch_chat twitch_events steam dota"
steps:
- uses: actions/checkout@v4

# Step 1: Fetch current image manifests
- name: Fetch current manifests
run: |
IMAGES=("twitch-chat" "twitch-events" "steam" "dota")
for IMAGE in "${IMAGES[@]}"; do
MANIFEST=$(curl -s -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GHA_READ_PKG }}" "https://ghcr.io/v2/dotabod/$IMAGE/manifests/v2.1")
for IMAGE in $IMAGES; do
IMAGE_NAME=$(echo "$IMAGE" | sed 's/_/-/g') # Replace underscores with hyphens for the actual image names
MANIFEST=$(curl -s -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GHA_READ_PKG }}" "https://ghcr.io/v2/dotabod/$IMAGE_NAME/manifests/v2.1")
echo "OLD_${IMAGE^^}_MANIFEST=$MANIFEST" >> $GITHUB_ENV
done
Expand All @@ -45,9 +47,9 @@ jobs:
id: check_updates
run: |
UPDATED_IMAGES=""
IMAGES=("twitch-chat" "twitch-events" "steam" "dota")
for IMAGE in "${IMAGES[@]}"; do
NEW_MANIFEST=$(curl -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GHA_READ_PKG }}" "https://ghcr.io/v2/dotabod/$IMAGE/manifests/v2.1")
for IMAGE in $IMAGES; do
IMAGE_NAME=$(echo "$IMAGE" | sed 's/_/-/g') # Replace underscores with hyphens for the actual image names
NEW_MANIFEST=$(curl -H "Accept: application/vnd.oci.image.index.v1+json" -H "Authorization: Bearer ${{ secrets.GHA_READ_PKG }}" "https://ghcr.io/v2/dotabod/$IMAGE_NAME/manifests/v2.1")
OLD_MANIFEST_VAR="OLD_${IMAGE^^}_MANIFEST"
# Compare manifests (e.g., using digests or other relevant data)
# Echo the new_manifest for debug pruposes to the github env for each image
Expand All @@ -66,8 +68,8 @@ jobs:
# Map package name to UUID
case $IMAGE in
"dota") UUID="esgckgc" ;;
"twitch-events") UUID="aopskdk" ;;
"twitch-chat") UUID="gahgag" ;;
"twitch_events") UUID="aopskdk" ;;
"twitch_chat") UUID="gahgag" ;;
"steam") UUID="asldja" ;;
esac
curl -X GET -H "Authorization: Bearer ${{ secrets.COOLIFY_API_KEY }}" "https://${{ secrets.COOLIFY_HOST }}/api/v1/deploy?uuid=${UUID}&force=false"
Expand Down

0 comments on commit 71c7c94

Please sign in to comment.