Skip to content

Commit

Permalink
Fixed docker image published (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
phearnot authored Sep 2, 2024
1 parent 086c672 commit b5d9ec5
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,51 @@ on:
type: string

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ghcr.io/${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'

- name: Build tarballs for Docker
run: sbt --mem 4096 --batch buildTarballsForDocker

- run: sbt --mem 4096 --batch buildTarballsForDocker
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- id: meta
uses: docker/metadata-action@v5
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.IMAGE_NAME }}
flavor: latest=false
tags: type=raw,value=${{ inputs.dockerTag }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.description="Unit Zero Node"
- uses: docker/build-push-action@v5
id: push
with:
context: ./docker
platforms: linux/amd64,linux/arm64
push: true
pull: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit b5d9ec5

Please sign in to comment.