Skip to content

Commit

Permalink
feat: also push image to docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Aug 28, 2024
1 parent a917547 commit e864119
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,12 @@ jobs:

ship:
needs: build
environment: build-ship
runs-on: ubuntu-latest

permissions:
packages: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -88,16 +85,24 @@ jobs:
id: metadata
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
proseim/prose-app-web
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=raw,value=${{ needs.build.outputs.tag }}
type=raw,value=latest
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit e864119

Please sign in to comment.