File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : JIB container publish
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ env :
8+ # Use docker.io for Docker Hub if empty
9+ REGISTRY : ghcr.io
10+ # github.repository as <account>/<repo>
11+ IMAGE_NAME : ${{ github.repository }}
12+ # Username to login to registry
13+ USERNAME : ${{ github.actor }}
14+ # Password to login to registry
15+ PASSWORD : ${{ secrets.GITHUB_TOKEN }}
16+
17+ jobs :
18+ publish :
19+
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+
24+ - name : downcase IMAGE_NAME
25+ run : |
26+ echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
27+
28+ - uses : actions/checkout@v2
29+ - name : Set up JDK 17
30+ uses : actions/setup-java@v2
31+ with :
32+ distribution : ' adopt'
33+ java-version : 17
34+
35+ - name : Buil JIB container and publish to GitHub Packages
36+ run : |
37+ mvn compile com.google.cloud.tools:jib-maven-plugin:3.1.4:build \
38+ -Djib.to.image=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }} \
39+ -Djib.to.auth.username=${{ env.USERNAME }} \
40+ -Djib.to.auth.password=${{ env.PASSWORD }} \
41+ -Djib.from.image=azul/zulu-openjdk:17-jre-headless
You can’t perform that action at this time.
0 commit comments