From 0b156dd6368f6c822624805da7b27118ac29239a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Mart=C3=ADnez=20Rinc=C3=B3n?= Date: Tue, 10 Dec 2024 23:58:12 +0100 Subject: [PATCH] fix: workaround for https://github.com/tailscale/github-action/issues/108 --- .github/workflows/main.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 96d1617..25dec55 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,12 @@ jobs: oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} tags: tag:ci + # Workaround for https://github.com/tailscale/github-action/issues/108 + - name: Build DNS resolutions + id: build_hosts_resolutions + run: | + registry_ip=$(sudo dig +short ${{ env.REGISTRY }}) + echo "hosts=${{ env.REGISTRY }}:$registry_ip" >> "$GITHUB_OUTPUT" - name: Login to registry uses: docker/login-action@v3 with: @@ -30,19 +36,11 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build - uses: docker/build-push-action@v6 - with: - context: . - platforms: ${{ env.IMAGE_ARCH }} - push: false - tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_PROJECT }}/${{ env.IMAGE_NAME }} - ${{ env.REGISTRY }}/${{ env.IMAGE_PROJECT }}/${{ env.IMAGE_NAME }}:latest - - name: Push + - name: Build and push uses: docker/build-push-action@v6 with: context: . + add-hosts: ${{ steps.build_hosts_resolutions.outputs.hosts }} platforms: ${{ env.IMAGE_ARCH }} push: true tags: |