diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 415a335..a319851 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,6 @@ on: jobs: build-and-push: runs-on: ubuntu-latest - container: gcr.io/kaniko-project/executor steps: - name: Checkout repository uses: actions/checkout@v2 @@ -17,9 +16,12 @@ jobs: - name: Build and Push Docker Image run: | - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"$DOCKER_REGISTRY\":{\"username\":\"$DOCKER_USERNAME\",\"password\":\"$DOCKER_PASSWORD\",\"auth\":\"$(echo -n "$DOCKER_USERNAME:$DOCKER_PASSWORD" | base64)\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $GITHUB_WORKSPACE --dockerfile $GITHUB_WORKSPACE/Dockerfile --destination $DOCKER_REGISTRY/$IMAGE_NAME:$IMAGE_TAG + docker run --rm \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v $(pwd):/workspace \ + gcr.io/kaniko-project/executor:latest \ + --dockerfile /workspace/Dockerfile \ + --destination $DOCKER_REGISTRY/$IMAGE_NAME:$IMAGE_TAG env: DOCKER_REGISTRY: git.coopgo.io DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}