Skip to content

Commit

Permalink
Merge pull request #179 from zero88/feature/upgrade-github-action
Browse files Browse the repository at this point in the history
chore(build): use shared-ghactions
  • Loading branch information
zero88 authored Mar 18, 2024
2 parents 2f34a14 + cd66a1d commit 706d477
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 260 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jooqx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:

jobs:
context:
uses: ./.github/workflows/subwf-context.yml
uses: zero88/shared-ghactions/.github/workflows/project-context.yml@main
with:
profile: 'jooqx'
skipBranchPattern: '^(jpa|rsql)/.*'
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
publish:
needs: [ context, build, analysis ]
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true'
uses: ./.github/workflows/subwf-publish.yml
uses: zero88/shared-ghactions/.github/workflows/gradle-publish.yml@main
with:
profile: 'jooqx'
version: ${{ needs.context.outputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jpa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:

jobs:
context:
uses: ./.github/workflows/subwf-context.yml
uses: zero88/shared-ghactions/.github/workflows/project-context.yml@main
with:
# https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations
profile: 'jpa'
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
publish:
needs: [ context, build ]
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true'
uses: ./.github/workflows/subwf-publish.yml
uses: zero88/shared-ghactions/.github/workflows/gradle-publish.yml@main
with:
profile: 'jpa'
version: ${{ needs.context.outputs.version }}
Expand Down
56 changes: 30 additions & 26 deletions .github/workflows/rsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:

jobs:
context:
uses: ./.github/workflows/subwf-context.yml
uses: zero88/shared-ghactions/.github/workflows/project-context.yml@main
with:
profile: 'rsql'
gitTagPrefix: 'rsql/v'
Expand Down Expand Up @@ -61,38 +61,42 @@ jobs:
run: ./gradlew test -Pprofile=${{ env.PROFILE }}

docs:
uses: zero88/shared-ghactions/.github/workflows/antora-docs.yml@main
needs: [ context, build ]
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true'
runs-on: ubuntu-latest
env:
REPO: zero88/jooqx
REF: main
WORKFLOW: wfd-docs.yml
GITHUB_TOKEN: ${{ secrets.OSS_GITHUB_TOKEN }}
steps:
- name: Trigger build ${{ env.PROFILE }} documentation
shell: bash
run: |
gh workflow run ${{ env.WORKFLOW }} --repo ${{ env.REPO }} --ref ${{ env.REF }} \
-f profile=${{ env.PROFILE }} \
-f version=${{ needs.context.outputs.version }} \
-f semanticVersion=${{ needs.context.outputs.semanticVersion }} \
-f hashVersion=${{ needs.context.outputs.commitId }} \
-f sha=${{ needs.context.outputs.sha }} \
-f isRelease=${{ needs.context.outputs.isRelease }} \
-f antoraBuildDir=rsql/asciidoc/build/docs/antora
with:
profile: 'rsql'
version: ${{ needs.context.outputs.version }}
semanticVersion: ${{ needs.context.outputs.semanticVersion }}
hashVersion: ${{ needs.context.outputs.commitId }}
sha: ${{ needs.context.outputs.sha }}
isRelease: ${{ needs.context.outputs.isRelease }}
antoraBuildDir: rsql/asciidoc/build/docs/antora
syncDoc: ${{ needs.context.outputs.shouldPublish }}
docBranch: ${{ needs.context.outputs.docBranch }}
docVersion: ${{ needs.context.outputs.docVersion }}
docCommitMsg: ${{ needs.context.outputs.docCommitMsg }}
secrets:
githubToken: ${{ secrets.OSS_GITHUB_TOKEN }}
gpgKey: ${{ secrets.CI_GPG_PRIVATE_KEY }}
gpgPassphrase: ${{ secrets.CI_GPG_PASSPHARSE }}

- name: Verify GitHub workflow run
shell: bash
run: |
sleep 5
fields=workflowDatabaseId,databaseId,status,event,headBranch,headSha,name,conclusion,url,createdAt,updatedAt
gh run list -R ${{ env.REPO }} -b ${{ env.REF }} -w ${{ env.WORKFLOW }} -L 1 --json $fields | jq
webdocs:
uses: zero88/shared-ghactions/.github/workflows/webdocs-communal-publish.yml@main
needs: [ context, docs ]
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true'
with:
webdocsRepo: 'zero88/webdocs'
webdocsRef: 'main'
webdocsWorkflow: 'webdocs.yml'
docCommitMsg: ${{ needs.context.outputs.docCommitMsg }}
secrets:
githubToken: ${{ secrets.OSS_GITHUB_TOKEN }}

publish:
needs: [ context, build ]
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true'
uses: ./.github/workflows/subwf-publish.yml
uses: zero88/shared-ghactions/.github/workflows/gradle-publish.yml@main
with:
profile: 'rsql'
version: ${{ needs.context.outputs.version }}
Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/subwf-context.yml

This file was deleted.

108 changes: 0 additions & 108 deletions .github/workflows/subwf-publish.yml

This file was deleted.

0 comments on commit 706d477

Please sign in to comment.