Skip to content

Commit 8bc1da6

Browse files
authored
Publish image to GitHub Container Registry (#28)
1 parent 7761f71 commit 8bc1da6

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ jobs:
1616
- name: Run CI
1717
run: |
1818
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin
19+
echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ secrets.CR_USER }} --password-stdin
1920
docker build -t ppiper/cf-cli:latest .
21+
docker tag ppiper/cf-cli:latest ghcr.io/sap/ppiper-cf-cli:latest
2022
docker push ppiper/cf-cli:latest
23+
docker push ghcr.io/sap/ppiper-cf-cli:latest

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ jobs:
2626
- name: Build, test and push
2727
run: |
2828
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin
29+
echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ secrets.CR_USER }} --password-stdin
2930
docker build -t ppiper/cf-cli:${{ env.PIPER_version }} .
31+
docker tag ppiper/cf-cli:${{ env.PIPER_version }} ghcr.io/sap/ppiper-cf-cli:${{ env.PIPER_version }}
3032
docker push ppiper/cf-cli:${{ env.PIPER_version }}
33+
docker push ghcr.io/sap/ppiper-cf-cli:${{ env.PIPER_version }}
3134
- uses: SAP/project-piper-action@master
3235
with:
3336
piper-version: latest

0 commit comments

Comments
 (0)