Skip to content

2.0.16

2.0.16 #15

Workflow file for this run

name: Publish master
on:
release:
types: [published]
permissions:
packages: write
env:
IMAGE: ghcr.io/${{ github.repository }}
NEW_VERSION: ${{ github.event.release.tag_name }}
jobs:
build:
name: Build and publish docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: 'master'
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
architecture: x64
cache: 'gradle'
- name: Build gradle artifacts
shell: bash
run: |
./gradlew shadowJar
env:
ORG_GRADLE_PROJECT_githubUser: x-access-token
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker images
run: |
docker build --tag ${{ env.IMAGE }}:${{ env.NEW_VERSION }} .
- name: Push docker image to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker login ghcr.io -u ${GITHUB_REPOSITORY} -p ${GITHUB_TOKEN}
docker push ${{ env.IMAGE }}:${{ env.NEW_VERSION }}