Skip to content

Commit

Permalink
Fix dockerhub action (#221)
Browse files Browse the repository at this point in the history
* add debugging

* fix yaml syntax

* Update workflow

* Fix typo
  • Loading branch information
mar-be authored Nov 10, 2023
1 parent 0389077 commit 1bb6c0b
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,34 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: planqk/atlas
tags: |
# set latest tag for master branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
uses: docker/setup-qemu-action@v1
- name: Set output
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/*/} | sed -e 's?/?-?g')
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push latest QC Atlas
uses: docker/build-push-action@v4
if: ${{ steps.vars.outputs.tag == 'master' }}
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: planqk/atlas:latest

- name: Build and push version of QC Atlas
if: ${{ steps.vars.outputs.tag != 'master' }}
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: planqk/atlas:${{ steps.vars.outputs.tag }}

0 comments on commit 1bb6c0b

Please sign in to comment.