Skip to content

build: fix action template #30

build: fix action template

build: fix action template #30

Workflow file for this run

name: debezium-offsetfile-conv-build
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash
permissions:
contents: read
packages: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: '0'
- name: Set up JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: '17'
distribution: 'liberica'
architecture: 'x64'
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 #v1.1.0
- name: Set up Gradle
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
with:
generate-job-summary: true
dependency-graph: generate-and-submit
# - name: Set up Go
# uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0
# with:
# go-version: 1.21.3
# - name: Install SVU
# run: go install github.com/caarlos0/svu@00b733b056534c0fbdb316bbd37c023e7bb80905 #v1.11.0
# - name: Get branch name (merge)
# if: github.event_name != 'pull_request'
# run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
# - name: Get branch name (pull request)
# if: github.event_name == 'pull_request'
# run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
# - name: Determine version (branch)
# if: env.BRANCH_NAME != 'master'
# run: 'echo "PROJECT_VERSION=$(svu --prerelease ${{ env.BRANCH_NAME }}-alpha.$(git rev-list master.. --count) --build ${{ github.run_number }})" >> "$GITHUB_ENV"'
# - name: Determine version
# if: env.BRANCH_NAME == 'master'
# run: 'echo "PROJECT_VERSION=$(svu)" >> "$GITHUB_ENV"'
# - run: 'echo "Determined version: $PROJECT_VERSION"'
- run: 'echo "PROJECT_VERSION=${{ github.sha }}" >> "$GITHUB_ENV"'
- name: Build
env:
ORG_GRADLE_PROJECT_projectVersion: ${{ env.PROJECT_VERSION }}
QUARKUS_PACKAGE_TYPE: uber-jar
run: ./gradlew build
- name: Upload jar
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: jar
path: build/quarkus-build/gen/debezium-offsetfile-conv-${{ env.PROJECT_VERSION }}-runner.jar
- name: Build native
env:
ORG_GRADLE_PROJECT_projectVersion: ${{ env.PROJECT_VERSION }}
QUARKUS_PACKAGE_TYPE: native
QUARKUS_NATIVE_CONTAINERBUILD: true
run: ./gradlew build
- name: Upload binary
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: binary_x86
path: build/debezium-offsetfile-conv-${{ env.PROJECT_VERSION }}-runner
- name: OWASP dependency check
env:
ORG_GRADLE_PROJECT_projectVersion: ${{ env.PROJECT_VERSION }}
run: ./gradlew dependencyCheckAggregate
- name: Upload build reports
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: build-reports
path: build/reports/
- name: Perform dependency review
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
# - name: Publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ORG_GRADLE_PROJECT_projectVersion: ${{ env.PROJECT_VERSION }}
# ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET }}
# ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
# run: ./gradlew publish