Skip to content

Commit

Permalink
[bug] Order docker registry logins in docker-dev.yml (#549)
Browse files Browse the repository at this point in the history
* Swap image order in docker-dev.yml

* Update docker-dev.yml

---------

Co-authored-by: KCarretto <[email protected]>
  • Loading branch information
Milkshak3s and KCarretto authored Feb 7, 2024
1 parent 3a88b54 commit 0853f37
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}


- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
spellshift/tavern
tags: |
type=ref,event=branch
type=edge,branch=main
type=sha,format=long
- name: Build and push Dockerhub image
uses: docker/build-push-action@v4
with:
file: ./docker/tavern.Dockerfile
context: .
push: true
target: production
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -38,23 +61,22 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
id: meta_ghcr
uses: docker/metadata-action@v4
with:
images: |
spellshift/tavern
${{ env.GHCR_REGISTRY }}/${{ env.GHCR_IMAGE_NAME }}
tags: |
type=ref,event=branch
type=edge,branch=main
type=sha,format=long
- name: Build and push Docker image
- name: Build and push GHCR image
uses: docker/build-push-action@v4
with:
file: ./docker/tavern.Dockerfile
context: .
push: true
target: production
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta_ghcr.outputs.tags }}
labels: ${{ steps.meta_ghcr.outputs.labels }}

0 comments on commit 0853f37

Please sign in to comment.