Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
rimrakhimov committed Jan 21, 2024
1 parent eaced8a commit 50dbe38
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/services-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ on:
- .github/workflows/base-image.yml
- docker/base.Dockerfile



env:
REGISTRY: ghcr.io
IMAGE_NAME: blockscout/visualizer
IMAGE_NAME: blockscout/services-base

jobs:
check_tag:
Expand Down Expand Up @@ -66,13 +64,12 @@ jobs:
- name: Check image tag exists
id: check_existence
env:
# TAG: ${{ steps.get_image_tag.outputs.tag }}
TAG: v0.2.0
TAG: ${{ steps.get_image_tag.outputs.tag }}
run: |
TOKEN=$(echo ${{ secrets.GITHUB_TOKEN }} | base64)
EXISTING_TAGS=$(curl -H "Authorization: Bearer ${TOKEN}" https://ghcr.io/v2/${IMAGE_NAME}/tags/list)
echo "a=${EXISTING_TAGS}"
echo "Existing tags: ${EXISTING_TAGS}"
if echo "${EXISTING_TAGS}" | jq -e "if has(\"tags\") then .tags else [] end | map(select(. == \"$TAG\")) | length > 0" > /dev/null; then
echo "There is already a pushed image with ${TAG} as tag. Skipping."
Expand All @@ -92,7 +89,7 @@ jobs:
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand Down

0 comments on commit 50dbe38

Please sign in to comment.