Skip to content

Commit

Permalink
take images from dockerhub instead of ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
miaucl committed Sep 20, 2024
1 parent 732727f commit 66e6779
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/version-bumper-chrome-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ jobs:
# Check the latest available tag from ghcr.io for aarch64
- name: Check latest tag for aarch64
id: latest_aarch64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" https://ghcr.io/v2/zenika/alpine-chrome/tags/list
LATEST_TAG=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" https://ghcr.io/v2/zenika/alpine-chrome/tags/list | jq -r '.tags[]' | sort -V | tail -n 1)
LATEST_TAG=$(curl -s "https://registry.hub.docker.com/v2/repositories/zenika/alpine-chrome/tags/" | jq -r '.results[].name' | grep '^[0-9]\+-' | sed 's/-.*//' | sort -n | tail -n 1)
# Check if the latest tag is empty
if [ -z "$LATEST_TAG" ]; then
Expand All @@ -60,7 +57,14 @@ jobs:
- name: Check latest tag for amd64
id: latest_amd64
run: |
LATEST_TAG=$(curl -s https://ghcr.io/v2/zenika/alpine-chrome/tags/list | jq -r '.tags[]' | sort -V | tail -n 1)
LATEST_TAG=$(curl -s "https://registry.hub.docker.com/v2/repositories/zenika/alpine-chrome/tags/" | jq -r '.results[].name' | grep '^[0-9]\+-' | sed 's/-.*//' | sort -n | tail -n 1)
# Check if the latest tag is empty
if [ -z "$LATEST_TAG" ]; then
echo "Error: No tags found or latest tag is empty. Aborting."
exit 1
fi
echo "Latest tag: $LATEST_TAG"
echo "::set-output name=latest_tag::$LATEST_TAG"
Expand Down
4 changes: 2 additions & 2 deletions chrome-runner/build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile
build_from:
aarch64: ghcr.io/zenika/alpine-chrome:124
amd64: ghcr.io/zenika/alpine-chrome:124
aarch64: zenika/alpine-chrome:124
amd64: zenika/alpine-chrome:124
labels:
org.opencontainers.image.title: "Home Assistant Add-on: Chrome Runner"
org.opencontainers.image.description: "Chrome runner in headless mode for browser automation."
Expand Down

0 comments on commit 66e6779

Please sign in to comment.