Add build workflow
This commit is contained in:
parent
bcbfc066f6
commit
fc705bf22b
1 changed files with 76 additions and 0 deletions
76
patches/workflow.patch
Normal file
76
patches/workflow.patch
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
diff --git a/.forgejo/workflows/package.yaml b/.forgejo/workflows/package.yaml
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..46a3954c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/.forgejo/workflows/package.yaml
|
||||||
|
@@ -0,0 +1,69 @@
|
||||||
|
+name: Build Patched Release
|
||||||
|
+
|
||||||
|
+on:
|
||||||
|
+ push:
|
||||||
|
+ branches:
|
||||||
|
+ - 'patches/*'
|
||||||
|
+
|
||||||
|
+jobs:
|
||||||
|
+ build:
|
||||||
|
+ runs-on: docker
|
||||||
|
+ container:
|
||||||
|
+ image: ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
|
+
|
||||||
|
+ steps:
|
||||||
|
+ - name: Checkout
|
||||||
|
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
+
|
||||||
|
+ - name: Set up JDK 17
|
||||||
|
+ uses: https://github.com/actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
||||||
|
+ with:
|
||||||
|
+ java-version: "17"
|
||||||
|
+ distribution: "temurin"
|
||||||
|
+
|
||||||
|
+ - uses: https://github.com/gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
|
||||||
|
+ with:
|
||||||
|
+ gradle-version: 8.12
|
||||||
|
+
|
||||||
|
+ - name: Run Gradle Command
|
||||||
|
+ run: ./gradlew clean build
|
||||||
|
+ env:
|
||||||
|
+ DOCKER_ENABLE_SECURITY: false
|
||||||
|
+
|
||||||
|
+ - name: Get version number
|
||||||
|
+ id: versionNumber
|
||||||
|
+ run: echo "versionNumber=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT
|
||||||
|
+
|
||||||
|
+ - name: Login to Container Registry
|
||||||
|
+ uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
||||||
|
+ with:
|
||||||
|
+ registry: git.spgrn.com
|
||||||
|
+ username: seang96
|
||||||
|
+ password: ${{ secrets.TOKEN }}
|
||||||
|
+
|
||||||
|
+ - name: Convert repository owner to lowercase
|
||||||
|
+ id: repoowner
|
||||||
|
+ run: echo "lowercase=$(echo ${{ github.repository_owner }} | awk '{print tolower($0)}')" >> $GITHUB_OUTPUT
|
||||||
|
+
|
||||||
|
+ - name: Generate tags fat
|
||||||
|
+ id: meta3
|
||||||
|
+ uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
|
||||||
|
+ with:
|
||||||
|
+ images: |
|
||||||
|
+ git.spgrn.com/${{ steps.repoowner.outputs.lowercase }}/s-pdf
|
||||||
|
+ git.spgrn.com/${{ steps.repoowner.outputs.lowercase }}/stirling-pdf
|
||||||
|
+ tags: |
|
||||||
|
+ type=raw,value=${{ steps.versionNumber.outputs.versionNumber }}-fat
|
||||||
|
+ type=raw,value=latest-fat
|
||||||
|
+
|
||||||
|
+ - name: Build and push main Dockerfile fat
|
||||||
|
+ id: build-push-fat
|
||||||
|
+ uses: docker/build-push-action@v5
|
||||||
|
+ with:
|
||||||
|
+ context: .
|
||||||
|
+ file: ./Dockerfile.fat
|
||||||
|
+ push: true
|
||||||
|
+ tags: ${{ steps.meta3.outputs.tags }}
|
||||||
|
+ labels: ${{ steps.meta3.outputs.labels }}
|
||||||
|
+ build-args: VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }}
|
||||||
|
+ platforms: linux/amd64
|
||||||
|
\ No newline at end of file
|
||||||
Loading…
Add table
Add a link
Reference in a new issue