ci: advanced CodeQL #218
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: Pull Request Open | |
on: | |
pull_request: | |
concurrency: | |
# PR open and close use the same group, allowing only one at a time | |
group: pr-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
vars: | |
name: Variables | |
runs-on: ubuntu-latest | |
outputs: | |
semver: ${{ steps.semver.outputs.version }} | |
tag: ${{ steps.semver.outputs.tag }} | |
steps: | |
# steps.semver.outputs.tag => needs.vars.outputs.semver | |
- uses: actions/checkout@v4 | |
with: | |
ref: refs/heads/${{ github.event.repository.default_branch }} | |
- name: Conventional Changelog Update | |
uses: TriPSs/[email protected] | |
id: semver | |
with: | |
git-branch: refs/heads/${{ github.head_ref }} | |
git-push: 'false' | |
skip-commit: 'true' | |
skip-on-empty: 'false' | |
skip-version-file: 'true' | |
- run: | | |
echo "semver=${{ steps.semver.outputs.version }}" | |
echo "tag=${{ steps.semver.outputs.tag }}" | |
pr-validation: | |
name: Pull Request Validation | |
runs-on: ubuntu-24.04 | |
needs: [vars] | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Removing old core | |
uses: paulushcgcj/[email protected] | |
continue-on-error: true | |
with: | |
token: ${{ secrets.PAT }} | |
type: maven | |
name: ca.bc.gov.nrs-commons.forest-client-core | |
version: ${{ needs.vars.outputs.semver }}.PR${{ github.event.number }} | |
user: ${{ github.repository_owner }} | |
- name: Removing old spring | |
uses: paulushcgcj/[email protected] | |
continue-on-error: true | |
with: | |
token: ${{ secrets.PAT }} | |
type: maven | |
name: ca.bc.gov.nrs-commons.forest-client-spring | |
version: ${{ needs.vars.outputs.semver }}.PR${{ github.event.number }} | |
user: ${{ github.repository_owner }} | |
build-certextractor: | |
name: Builds Cert Extractor | |
runs-on: ubuntu-24.04 | |
needs: [vars, pr-validation] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bcgov-nr/[email protected] | |
name: Build Cert Extractor | |
with: | |
package: certextractor | |
tag: ${{needs.vars.outputs.semver}}.PR${{ github.event.number }} | |
tag_fallback: test | |
token: ${{ secrets.GITHUB_TOKEN }} | |
triggers: "certextractor/" | |
build_args: | | |
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | |
VERSION=${{ needs.vars.outputs.semver }}.PR${{ github.event.number }} | |
build-core: | |
name: Build Core | |
runs-on: ubuntu-24.04 | |
needs: [vars, pr-validation] | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Publish Core | |
uses: paulushcgcj/[email protected] | |
with: | |
dir: core | |
app-version: ${{ needs.vars.outputs.semver }}.PR${{ github.event.number }} | |
extra-params: -DskipTests -Dtests.skip=true | |
add-sources: true | |
add-javadoc: true | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
build-spring: | |
name: Build Spring | |
runs-on: ubuntu-24.04 | |
needs: [vars, build-core] | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Publish Spring | |
uses: paulushcgcj/[email protected] | |
with: | |
dir: spring | |
app-version: ${{ needs.vars.outputs.semver }}.PR${{ github.event.number }} | |
extra-params: -DskipTests -Dtests.skip=true -Dcore.version=${{ needs.vars.outputs.semver }}.PR${{ github.event.number }} | |
add-sources: true | |
add-javadoc: true | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |