Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
timosalm committed Nov 7, 2024
1 parent a86a2a1 commit 112ff78
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/native-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:

push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
cache: 'gradle'

- run: ./gradlew bootBuildImage -PbuildProfile=graalvm --no-daemon --imageName="ghcr.io/${{ github.repository }}:hello-world-native"

- uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- run: docker push ghcr.io/${{ github.repository }}:hello-world-native

0 comments on commit 112ff78

Please sign in to comment.