Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): use shared-ghactions #179

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading