Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TaylorTWBrown committed Feb 12, 2024
1 parent 71beba7 commit 9ae6bd1
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,19 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
id: meta-ghcr
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
${{ env.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}
${{ env.REGISTRY_DOCKERHUB }}/${{ github.actor }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}


- name: Build and push Docker image to GitHub
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-ghcr.outputs.tags }}
labels: ${{ steps.meta-ghcr.outputs.labels }}

- name: Log in to DockerHub
uses: docker/#-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand All @@ -55,10 +53,16 @@ jobs:
username: ${{ env.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }} # You need to set this secret in your GitHub repository settings

- name: Extract metadata (tags, labels) for Docker
id: meta-dh
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY_DOCKERHUB }}/${{ github.actor }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image to DockerHub
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-dh.outputs.tags }}
labels: ${{ steps.meta-dh.outputs.labels }}

0 comments on commit 9ae6bd1

Please # to comment.