Skip to content

Commit

Permalink
chore(build): publish also on dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
o-orand committed Mar 13, 2024
1 parent be8c2d6 commit 3dc7df3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
env:
DOCKER_FILE_PATH: .
IMAGE: "ghcr.io/${{ github.repository }}"
DOCKERHUB_ORG: elpaasoci
OCI_IMAGE: concourse-pipeline-resource

jobs:
build_and_publish:
name: build and publish
Expand All @@ -21,6 +24,12 @@ jobs:

steps:
- uses: actions/checkout@v4
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -36,6 +45,8 @@ jobs:
context: ${{env.DOCKER_FILE_PATH}}
push: true
tags: |
${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:latest
${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:${{github.sha}}
${{ env.IMAGE}}:latest
${{ env.IMAGE}}:${{github.sha}}
-
Expand All @@ -46,4 +57,5 @@ jobs:
push: true
context: ${{ env.DOCKER_FILE_PATH }}
tags: |
${{ env.IMAGE}}:${{github.ref_name}}
${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:${{github.ref_name}}
${{env.IMAGE}}:${{github.ref_name}}

0 comments on commit 3dc7df3

Please sign in to comment.