This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
chore(deps): bump tj-actions/branch-names in /.github/workflows #74
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: Build | |
on: push | |
jobs: | |
update-license: | |
strategy: | |
matrix: | |
java: [ | |
17 | |
] | |
os: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Get Branch Name | |
id: branch-name | |
uses: tj-actions/branch-names@v8 | |
- name: Check For --no-actions Flag | |
if: ${{ contains(github.event.commits[0].message, '--no-actions') }} | |
run: echo "run=false" >> $GITHUB_ENV | |
- name: Validate Gradle Wrapper | |
if: ${{ env.run != 'false' }} | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup JDK ${{ matrix.java }} | |
if: ${{ env.run != 'false' }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' && env.run != 'false' }} | |
run: chmod +x ./gradlew | |
- name: Update Licenses | |
if: ${{ env.run != 'false' }} | |
continue-on-error: true | |
run: | | |
./gradlew updateLicenses | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions" | |
git pull origin ${{ steps.branch-name.outputs.current_branch }} | |
git commit -m "Update License [bot]" -a | |
- name: Push License Changes | |
if: ${{ env.run != 'false' }} | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
build: | |
needs: update-license | |
strategy: | |
matrix: | |
java: [ | |
17 | |
] | |
os: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Get Branch Name | |
id: branch-name | |
uses: tj-actions/branch-names@v8 | |
- name: Check For --no-actions Flag | |
if: ${{ contains(github.event.commits[0].message, '--no-actions') }} | |
run: echo "run=false" >> $GITHUB_ENV | |
- name: Validate Gradle Wrapper | |
if: ${{ env.run != 'false' }} | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup JDK ${{ matrix.java }} | |
if: ${{ env.run != 'false' }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' && env.run != 'false' }} | |
run: chmod +x ./gradlew | |
- name: Pull License Changes | |
if: ${{ env.run != 'false' }} | |
run: git pull origin ${{ steps.branch-name.outputs.current_branch }} | |
- name: Build | |
if: ${{ env.run != 'false' }} | |
run: ./gradlew build | |
- name: Capture Build Artifacts | |
if: ${{ env.run != 'false' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Artifacts | |
path: build/libs/ |