Skip to content

Commit

Permalink
Try update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pbe-axelor committed Sep 14, 2023
1 parent 1185740 commit 50b5ae0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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\//}

Expand All @@ -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
Expand All @@ -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/[email protected]
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 }}

0 comments on commit 50b5ae0

Please sign in to comment.