Skip to content

Fix tag names

Fix tag names #11

# GitHub Actions workflow to automatically publish snapshot builds.
name: "Publish snapshots"
on:
push:
branches: [ "**" ]
env:
JAVA_VERSION: 21
jobs:
maven:
name: "Maven"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
- name: "Fetch git tags" # Required for axion-release-plugin
run: git fetch --tags --unshallow
- name: "Set up Java ${{ env.JAVA_VERSION }}"
uses: actions/setup-java@v3
with:
java-version: "${{ env.JAVA_VERSION }}"
distribution: "liberica"
- name: "Grant execute permission for gradlew"
run: chmod +x gradlew
- name: "Gradle publish"
uses: gradle/gradle-build-action@v2
with:
arguments: "shadowJar publish"
env:
MAVEN_NAME: ${{ secrets.MAVEN_NAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
docker:
name: "Docker"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
- name: "Fetch Git tags" # Required for axion-release-plugin
run: git fetch --tags --unshallow
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v2
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v2
- name: "Login to DockerHub"
uses: docker/login-action@v2
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_TOKEN }}"
- name: "Extract branch name"
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | tr / - >> $GITHUB_OUTPUT
id: extract_branch
- name: "Build and push"
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: technicolorlabs/reposilite-liberica-testing:${{ steps.extract_branch.outputs.branch }}