Skip to content

Commit

Permalink
fix: workaround for tailscale/github-action#108
Browse files Browse the repository at this point in the history
  • Loading branch information
jamezrin committed Dec 10, 2024
1 parent 5a263c0 commit d3d290d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -30,19 +36,15 @@ 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
buildkitd-config-inline: |
[dns]
nameservers=["100.100.100.100"]
- 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: |
Expand Down

0 comments on commit d3d290d

Please sign in to comment.