From 50b5ae0dd4d32e197de6836d6126103da076bc40 Mon Sep 17 00:00:00 2001 From: Pierre Belloy Date: Fri, 15 Sep 2023 00:59:00 +0200 Subject: [PATCH] Try update workflow --- .github/workflows/build-and-publish.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 446741c..146b4c6 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -9,7 +9,7 @@ on: - created env: - DOCKER_REGISTRY_URL: docker.io + DOCKER_REGISTRY_URL: ghcr.io DOCKER_IMAGE_NAME: pbe-axelor/ovh-dynhost-updater RELEASE_TAG: ${GITHUB_REF/refs\/tags\//} @@ -22,8 +22,12 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - - name: Login to docker registry - run: echo -n "${{secrets.DOCKER_PASSWORD}}" | docker login --username "${{secrets.DOCKER_USERNAME}}" --password-stdin ${{env.DOCKER_REGISTRY_URL}} + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.DOCKER_REGISTRY_URL }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} # Install QEMU to emulate different architecture (required to use buildx for ARM) - name: Set up QEMU @@ -41,11 +45,11 @@ jobs: # build and publish image for multiple architectures - name: Build and publish if: success() - run: docker buildx build --platform linux/amd64,linux/arm64 --output type=image,push=true -t ${{env.DOCKER_REGISTRY_URL}}/${{env.DOCKER_IMAGE_NAME }}:${{ env.RELEASE_TAG }} -t ${{env.DOCKER_REGISTRY_URL}}/${{env.DOCKER_IMAGE_NAME }}:latest . + run: docker buildx build --platform linux/amd64,linux/arm64 --output type=image,push=true -t ${{ env.DOCKER_REGISTRY_URL }}/${{ env.DOCKER_IMAGE_NAME }}:${{ env.RELEASE_TAG }} -t ${{ env.DOCKER_REGISTRY_URL }}/${{ env.DOCKER_IMAGE_NAME }}:latest . - name: Docker Hub Description uses: peter-evans/dockerhub-description@v2.1.0 env: DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKERHUB_REPOSITORY: ${{secrets.DOCKER_REGISTRY_URL}}/${{ env.DOCKER_IMAGE_NAME }} + DOCKERHUB_REPOSITORY: ${{ env.DOCKER_REGISTRY_URL }}/${{ env.DOCKER_IMAGE_NAME }}