1
0
Jannik Reimers 9228529f18
Some checks failed
Build & Publish / build (push) Failing after 3m53s
fuck the cache, it didnt wanna work properly anyways
2025-01-05 21:14:59 +01:00

64 lines
1.6 KiB
YAML

name: Build & Publish
on:
push:
branches:
- root
schedule:
- cron: "0 6 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Disable SSL verify (Temporary Fix)
run: git config --global http.sslVerify false
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Gradle (Build)
run: "./gradlew build"
- name: Login to Gitea Registry
uses: docker/login-action@v3
with:
registry: pi5:8125
username: ${{ github.repository_owner }}
password: ${{ secrets.PW }}
- name: Build the Docker image
run: docker build -t pi5:8125/jansel/feixiao:latest -t pi5:8125/jansel/feixiao:${{ steps.date.outputs.date }} .
- name: Push the Docker image related to this workflow
run: docker push pi5:8125/jansel/feixiao:${{ steps.date.outputs.date }}
- name: Push the latest Docker image
run: docker push pi5:8125/jansel/feixiao:latest
- name: Remove the Docker image
run: docker rmi pi5:8125/jansel/feixiao:${{ steps.date.outputs.date }}
- name: Force remove the latest Docker image
run: docker rmi pi5:8125/jansel/feixiao:latest --force