From 00d612c02540aa760b5af81114d752c9ea170454 Mon Sep 17 00:00:00 2001 From: Eicke Herbertz Date: Tue, 30 Jan 2024 22:29:04 +0100 Subject: [PATCH] update docker build --- .github/workflows/dockerimage.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index ca5eddc..456acea 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -5,21 +5,29 @@ on: branches: [ master ] workflow_dispatch: -env: - DOCKER_BUILDKIT: 1 - jobs: docker: runs-on: ubuntu-latest steps: - name: Pull repository uses: actions/checkout@v4 - - name: Build the image - run: docker build . --tag wolletd/wg-setup:latest - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Push the image - run: docker push wolletd/wg-setup:latest + - name: Login to ghcr.io + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push the image + uses: docker/build-push-action@v4 + with: + context: . + push: true + provenance: false + tags: | + docker.io/wolletd/wg-setup:latest + ghcr.io/wolletd/wg-setup:latest