Skip to content

Commit

Permalink
Update backend-maven-node-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hupling committed Jul 1, 2024
1 parent bc42b43 commit d20cb95
Showing 1 changed file with 18 additions and 30 deletions.
48 changes: 18 additions & 30 deletions .github/workflows/backend-maven-node-build.yml
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 }}

0 comments on commit d20cb95

Please sign in to comment.