build: attempt to add versioning flow #17
Workflow file for this run
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: 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-latest | |
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: Install SVU | |
# env: | |
# GOBIN: $HOME/bin | |
# run: sudo go install github.com/caarlos0/svu@00b733b056534c0fbdb316bbd37c023e7bb80905 #v1.11.0 | |
# - name: Determine version | |
# run: 'ls -al $HOME/bin && echo "PROJECT_VERSION=$($HOME/bin/svu --build ${{ github.run_attempt }})" >> "$GITHUB_ENV" && echo Version: "$PROJECT_VERSION"' | |
- name: Determine version | |
uses: .github/actions/svu | |
id: version | |
with: | |
args: --build ${{ github.run_attempt }} | |
# run: 'ls -al $HOME/bin && echo "PROJECT_VERSION=$($HOME/bin/svu --build ${{ github.run_attempt }})" >> "$GITHUB_ENV" && echo Version: "$PROJECT_VERSION"' | |
- name: Set version | |
run: 'echo "PROJECT_VERSION=${{ steps.version.outputs.output }}" >> "$GITHUB_ENV" && echo Version: "$PROJECT_VERSION"' | |
- name: Build | |
env: | |
ORG_GRADLE_PROJECT_projectVersion: ${{ env.PROJECT_VERSION }} | |
run: ./gradlew build | |
- 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/ | |
dependency-review: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Perform dependency review | |
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0 | |