Skip to content

Commit

Permalink
[:init:gha] use shared workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
zero88 committed Jan 27, 2023
1 parent c307726 commit 297c37d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
types: [ opened, synchronize, reopened, closed ]
branches: [ main ]

env:
JAVA_DIST: 'temurin'
JAVA_VERSION: 11

jobs:
context:
uses: play-iot/gha-ci/.github/workflows/project-context.yml@main
Expand All @@ -22,3 +26,15 @@ jobs:
githubToken: ${{ secrets.BEEIO_CI_TOKEN }}
gpgKey: ${{ secrets.OSS_GPG_PRIVATE_KEY }}
gpgPassphrase: ${{ secrets.OSS_GPG_PASSPHARSE }}

build:
needs: context
if: needs.context.outputs.shouldBuild == 'true'
uses: play-iot/gha-ci/.github/workflows/gradle-build.yml@main
with:
profile: 'all'
version: ${{ needs.context.outputs.version }}
semanticVersion: ${{ needs.context.outputs.semanticVersion }}
hashVersion: ${{ needs.context.outputs.commitId }}
javaDist: 'temurin'
javaVersion: '11'
13 changes: 3 additions & 10 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ env:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: play-iot/gha-ci/yarn-build@main
with:
nodeVersion: ${{ env.NODE_VERSION }}

- name: Test
run: yarn test
uses: play-iot/gha-ci/.github/workflows/yarn-build.yml@main
with:
nodeVersion: '16'

0 comments on commit 297c37d

Please sign in to comment.