test
Build and Push Docker Image / build-and-push (push) Failing after 5s Details

This commit is contained in:
Nicolas CARON 2024-03-20 11:50:21 +01:00
parent bac39121bd
commit ce9f17735c
1 changed files with 6 additions and 4 deletions

View File

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