Merge pull request #633 from Shikkanime/dev #258
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release workflow | |
on: | |
push: | |
branches: | |
- master | |
env: | |
REGISTRY_IMAGE: registry.shikkanime.fr:5000/shikkanime-core | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get next version | |
uses: reecetech/[email protected] | |
id: version | |
with: | |
scheme: conventional_commits | |
- name: Generate Git Tag | |
id: generate_tag | |
run: | | |
NEW_TAG="${{ steps.version.outputs.v-version }}" | |
echo "Generated new tag: $NEW_TAG" | |
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV | |
- name: Push Git Tag | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
git tag $NEW_TAG | |
git push origin $NEW_TAG | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'corretto' | |
- name: Build | |
run: gradle clean installDist | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.shikkanime.fr:5000 | |
username: ziedelth | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build docker file | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ env.REGISTRY_IMAGE }}:latest,${{ env.REGISTRY_IMAGE }}:${{ steps.version.outputs.v-version }} | |
platforms: linux/arm64/v8 | |
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:buildcache | |
cache-to: type=registry,ref=${{ env.REGISTRY_IMAGE }}:buildcache |