Skip to content

Commit 73776a4

Browse files
committed
ops: CI/CD tweaks; added ghcr
1 parent 3a05681 commit 73776a4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ jobs:
1414
uses: actions/checkout@v3
1515
- name: Prepare docker buildx
1616
uses: docker/setup-buildx-action@v2
17-
- name: Login to ghcr.io
18-
run: echo "${{ secrets.DOCKER_HUB_PASS }}" | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
17+
- name: Login to Docker Hub
18+
run: |
19+
echo "${{ secrets.DOCKER_HUB_PASS }}" | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
20+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin ghcr.io
1921
- name: Build Docker image
2022
uses: docker/build-push-action@v3
2123
with:
@@ -24,7 +26,7 @@ jobs:
2426
push: true
2527
cache-from: type=gha
2628
cache-to: type=gha,mode=max
27-
tags: tivix/docker-nginx:${{ github.sha }}, tivix/docker-nginx:${{ env.CI_REF_NAME }}
29+
tags: tivix/docker-nginx:${{ github.sha }}, tivix/docker-nginx:${{ env.CI_REF_NAME }}, ghcr.io/tivix/docker-nginx:${{ env.CI_REF_NAME }}
2830
- name: Run Trivy vulnerability scanner
2931
uses: aquasecurity/trivy-action@master
3032
with:

0 commit comments

Comments
 (0)