Skip to content

Commit

Permalink
ops: CI/CD tweaks; added ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
ironhalik committed Apr 9, 2024
1 parent 3a05681 commit 73776a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
uses: actions/checkout@v3
- name: Prepare docker buildx
uses: docker/setup-buildx-action@v2
- name: Login to ghcr.io
run: echo "${{ secrets.DOCKER_HUB_PASS }}" | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_HUB_PASS }}" | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin ghcr.io
- name: Build Docker image
uses: docker/build-push-action@v3
with:
Expand All @@ -24,7 +26,7 @@ jobs:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: tivix/docker-nginx:${{ github.sha }}, tivix/docker-nginx:${{ env.CI_REF_NAME }}
tags: tivix/docker-nginx:${{ github.sha }}, tivix/docker-nginx:${{ env.CI_REF_NAME }}, ghcr.io/tivix/docker-nginx:${{ env.CI_REF_NAME }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
Expand Down

0 comments on commit 73776a4

Please sign in to comment.