Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error response from daemon #417

Closed
enahsor opened this issue Mar 1, 2023 · 1 comment
Closed

Error response from daemon #417

enahsor opened this issue Mar 1, 2023 · 1 comment

Comments

@enahsor
Copy link

enahsor commented Mar 1, 2023

Behaviour

This might be a temporary issue that is entirely on github's side but on the off chance that it is being caused by this action, I'm posting here. (If it is ever resolved without any action from any of the authors or myself, I will close this issue myself.)

Expected behaviour

I expected docker to authenticate to artifact registry using the variables I provided

Actual behaviour

I ended receiving this error:
Error response from daemon: Get "https://us-central1/v2/": dial tcp: lookup us-central1: Temporary failure in name resolution

Configuration

  • Repository URL (if public):
  • Build URL (if public):
name: Service CD

on:
  push:
    branches:
      - "main"

env:
  PROJECT_ID: project-id
  LOCATION: us-central1
  REPO: repo-name
  SERVICE: service

jobs:
  upload-image-to-artifact-registry:
    permissions:
      contents: read
      id-token: write
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Google Auth
        id: auth
        uses: "google-github-actions/auth@v0"
        with:
          token_format: "access_token"
          workload_identity_provider: "${{ secrets.WIF_PROVIDER }}"
          service_account: "${{ secrets.WIF_SERVICE_ACCOUNT }}"

      - name: Docker Auth
        id: docker-auth
        uses: "docker/login-action@v1"
        with:
          username: "oauth2accesstoken"
          password: "${{ steps.auth.outputs.access_token }}"
          registry: "${{ env.LOCATION }}"

      - name: Build and Push Container
        run: |-
          docker build -t "${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPO }}/${{env.SERVICE}}:{{ github.sha }}" --build-arg BUILD_CONTEXT="{{ env.SERVICE }}" -f Dockerfile.prod ./
          docker push "${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPO }}/${{env.SERVICE}}:{{ github.sha }}"
  deploy-image:
    needs: upload-image-to-artifact-registry
    permissions:
      contents: read
      id-token: write
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Google Authentication
        id: auth
        uses: "google-github-actions/auth@v0"
        with:
          token_format: "access_token"
          workload_identity_provider: "${{ secrets.WIF_PROVIDER }}"
          service_account: "${{ secrets.WIF_SERVICE_ACCOUNT }}"

      - name: Deploy to Cloud Run
        id: deploy
        uses: "google-github-actions/deploy-cloudrun@v0"
        with:
          service: ${{ env.SERVICE }}
          region: ${{ env.LOCATION }}
          image: ${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPO }}/${{ env.SERVICE }}:${{ github.sha }}

      - name: Show Output
        run: echo ${{ steps.deploy.outputs.url }}

Logs

Download the log file of your build
and attach it to this issue.

@enahsor enahsor closed this as completed Mar 1, 2023
@enahsor
Copy link
Author

enahsor commented Mar 1, 2023

Seems I missed the -docker.pkg.dev that should follow the location on the registry key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant