From 08c0bec876c6610240445f3f92b6100ea0846c18 Mon Sep 17 00:00:00 2001 From: Geczy Date: Wed, 27 Dec 2023 13:49:46 -0500 Subject: [PATCH] Remove unnecessary steps and actions from builder workflow --- .github/workflows/builder.yml | 41 ----------------------------------- 1 file changed, 41 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 8334f15b2..df29d8964 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -15,14 +15,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Fetch current manifests - run: | - for IMAGE in $IMAGES; do - IMAGE_NAME=$(echo "$IMAGE" | sed 's/_/-/g') - 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/tags/list") - echo "OLD_${IMAGE^^}_MANIFEST=$MANIFEST" >> $GITHUB_ENV - done - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to ghcr @@ -40,36 +32,3 @@ jobs: provenance: false set: | *.platform=linux/arm64 - - - name: Check for updated images - id: check_updates - run: | - UPDATED_IMAGES="" - for IMAGE in $IMAGES; do - IMAGE_NAME=$(echo "$IMAGE" | sed 's/_/-/g') - 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/tags/list") - OLD_MANIFEST_VAR="OLD_${IMAGE^^}_MANIFEST" - # Echo the new_manifest for debug purposes to the github env for each image - echo "NEW_${IMAGE^^}_MANIFEST=$NEW_MANIFEST" >> $GITHUB_ENV - # Trim both new and old manifests from whitespace - NEW_MANIFEST=$(echo "$NEW_MANIFEST" | tr -d '[:space:]' | base64) - OLD_MANIFEST=$(echo "${!OLD_MANIFEST_VAR}" | tr -d '[:space:]' | base64) - # Compare the new and old manifests to see if they don't equal - if [ "$NEW_MANIFEST" != "$OLD_MANIFEST" ]; then - UPDATED_IMAGES+="$IMAGE " - fi - done - echo "UPDATED_IMAGES=$UPDATED_IMAGES" >> $GITHUB_ENV - - - name: Notify on updated images - if: env.UPDATED_IMAGES != '' - run: | - for IMAGE in $UPDATED_IMAGES; do - case $IMAGE in - "dota") UUID="esgckgc" ;; - "twitch_events") UUID="aopskdk" ;; - "twitch_chat") UUID="gahgag" ;; - "steam") UUID="asldja" ;; - esac - curl -s -X GET -H "Authorization: Bearer ${{ secrets.COOLIFY_API_KEY }}" "https://${{ secrets.COOLIFY_HOST }}/api/v1/deploy?uuid=${UUID}&force=false" - done