Skip to content

Check if version is obfuscated before filtering for hashed versions #53

Check if version is obfuscated before filtering for hashed versions

Check if version is obfuscated before filtering for hashed versions #53

Workflow file for this run

name: Build container
on:
push:
branches: [ '*' ]
pull_request:
env:
JAVA_VERSION: 21
BUILD_NUMBER: ${{ github.run_number }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup ENV
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build shadowJar
env:
VERSION: ${{ env.SHORT_SHA }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@ee6b445351cd81e2f73a16a0e52d598aeac2197f # v5.3.0
if: success() || failure() # always run even if the previous step fails
with:
report_paths: 'build/test-results/test/TEST-*.xml'
- name: Upload Shadow Jar
uses: actions/upload-artifact@v4
with:
name: update-quilt-meta-jar-${{ env.SHORT_SHA }}
path: build/libs/*-all.jar
ghcr:
runs-on: ubuntu-latest
steps:
- name: Setup ENV
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
# set latest tag for default branch
tags: |
type=ref,event=branch,suffix=-latest
type=sha
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ env.SHORT_SHA }}
JAVA_VERSION=${{ env.JAVA_VERSION }}
BUILD_NUMBER=${{ env.BUILD_NUMBER }}
generate-meta:
runs-on: ubuntu-latest
needs: build
steps:
- name: Setup ENV
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Download Jar
uses: actions/download-artifact@v4
with:
name: update-quilt-meta-jar-${{ env.SHORT_SHA }}
- name: Generate Debug Meta Files
run:
java -jar update-quilt-meta-${{ env.SHORT_SHA }}-all.jar --local-output-dir ./meta-files
- name: Compress Files
run: tar -czf quilt-meta-files-${{ env.SHORT_SHA }}-debug.tar.gz ./meta-files
- name: Upload Meta Files
uses: actions/upload-artifact@v4
with:
name: quilt-meta-files-${{ env.SHORT_SHA }}-debug
path: quilt-meta-files-${{ env.SHORT_SHA }}-debug.tar.gz
compression-level: '0'