Skip to content

Commit

Permalink
Merge pull request #6 from e7d/feat/main/ghcr-docker-image
Browse files Browse the repository at this point in the history
Also push Docker images to GHCR
  • Loading branch information
e7d authored Mar 29, 2024
2 parents 5539040 + 29a5e0f commit 9f0514e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

permissions:
contents: read
packages: write
pull-requests: write

env:
Expand All @@ -32,12 +33,19 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ vars.DOCKERHUB_IMAGE }}
${{ vars.GHCR_IMAGE }}
labels: |
org.opencontainers.image.title=docker-diskmark
org.opencontainers.image.description=A disk benchmarking tool for Docker
Expand All @@ -64,7 +72,7 @@ jobs:
uses: docker/scout-action@v1
with:
command: cves,recommendations,compare
image: ${{ steps.meta.outputs.tags }}
image: ${{ vars.DOCKERHUB_IMAGE }}:${{ env.SHA }}
to: ${{ vars.DOCKERHUB_IMAGE }}:latest
ignore-base: true
ignore-unchanged: true
Expand Down

0 comments on commit 9f0514e

Please sign in to comment.