-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,34 @@ | ||
name: Compliance check and build test | ||
|
||
|
||
env: | ||
|
||
APP_PATH: "/sps-backend" # example "/backend" for monorepos or "" for multi repos | ||
app-path: "/sps-backend" # example "/backend" for monorepos or "" for multi repos | ||
|
||
on: # defining on which triggers this action should run | ||
push: | ||
branches: | ||
# define on push of which branches should this action be run | ||
paths: | ||
- "sps-backend/**" # define the concrete paths on which a change triggers this action, e.g. backend/** | ||
- ".github/workflows/**" # define the concrete paths on which a change triggers this action, e.g. backend/** | ||
- "sps-backend/**" # define the concrete paths on which a change triggers this action, e.g. backend/** | ||
- ".github/workflows/**" # define the concrete paths on which a change triggers this action, e.g. backend/** | ||
pull_request: # trigger this action also on Pull Requests | ||
types: [ opened, reopened ] | ||
|
||
jobs: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
build-maven: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: it-at-m/.github/.github/actions/action-maven-node-build@reuseable-workflow | ||
with: | ||
app-path: ".${{ env.APP_PATH }}" | ||
|
||
#build-image: | ||
# needs: build-maven | ||
# uses: it-at-m/.github/.github/workflows/reuseable-template-build-image.yml@reuseable-workflow | ||
# with: | ||
|
||
# app-path: "/sps-backend" | ||
# secrets: | ||
# registry-password: ${{ secrets.GITHUB_TOKEN }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: it-at-m/.github/.github/actions/action-maven-node-build@reuseable-workflow | ||
with: | ||
app-path: "${{ env.app-path }}" | ||
|
||
build-image: | ||
runs-on: ubuntu-latest | ||
needs: build-maven | ||
steps: | ||
- uses: it-at-m/.github/.github/actions/action-build-image@reuseable-workflow | ||
with: | ||
app-path: "${{ env.APP_PATH }}" | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ghcr.io # ${{ env.REGISTRY }} | ||
registry-username: ${{ github.actor }} | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: it-at-m/.github/.github/actions/action-build-image@reuseable-workflow | ||
with: | ||
app-path: "${{ env.app-path }}" | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ghcr.io | ||
registry-username: ${{ github.actor }} |