Skip to content

Commit 3b785b8

Browse files
committed
wip
1 parent 1bdd6a4 commit 3b785b8

3 files changed

Lines changed: 25 additions & 11 deletions

File tree

.github/workflows/build.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
ci:
8+
name: CI
9+
uses: getdevopspro/github-actions/.github/workflows/pull-request.yml@v3.0.0
10+
with:
11+
version-package: package.json
12+
version-package-lock: package-lock.json
13+
version-output-format: >-
14+
{{.Major}}.{{.Minor}}.{{.Patch}}${{ github.ref_name != github.event.repository.default_branch && '-pull-request' || '' }}
15+
pre-lint-command: NODEAPP_UID=$(id -u) NODEAPP_RESTART_POLICY=no NODEAPP_COMMAND="bash -c 'npm ci --ignore-scripts; npm run lint'" docker compose up nodeapp --force-recreate --remove-orphans --abort-on-container-exit --exit-code-from nodeapp
16+
pre-test-unit-command: NODEAPP_UID=$(id -u) NODEAPP_RESTART_POLICY=no NODEAPP_COMMAND="bash -c 'npm ci --ignore-scripts; npm run test'" docker compose up nodeapp --force-recreate --remove-orphans --abort-on-container-exit --exit-code-from nodeapp

.github/workflows/pull-request.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ permissions:
1313
packages: write
1414

1515
jobs:
16-
ci:
17-
name: CI
18-
uses: getdevopspro/github-actions/.github/workflows/pull-request.yml@v2.0.0
19-
with:
20-
version-package: package.json
21-
version-package-lock: package-lock.json
22-
pre-lint-command: NODEAPP_UID=$(id -u) NODEAPP_RESTART_POLICY=no NODEAPP_COMMAND="bash -c 'npm ci --ignore-scripts; npm run lint'" docker compose up nodeapp --force-recreate --remove-orphans --abort-on-container-exit --exit-code-from nodeapp
23-
pre-test-unit-command: NODEAPP_UID=$(id -u) NODEAPP_RESTART_POLICY=no NODEAPP_COMMAND="bash -c 'npm ci --ignore-scripts; npm run test'" docker compose up nodeapp --force-recreate --remove-orphans --abort-on-container-exit --exit-code-from nodeapp
16+
build:
17+
name: Build
18+
uses: ./.github/workflows/build.yaml

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ permissions:
2020
checks: write
2121

2222
jobs:
23+
build:
24+
name: Build
25+
uses: ./.github/workflows/build.yaml
26+
2327
release:
24-
uses: getdevopspro/github-actions/.github/workflows/promote.yml@v2.0.0
25-
# secrets:
26-
# checkout-token: ${{ secrets.CHECKOUT_TOKEN }}
28+
needs: build
29+
uses: getdevopspro/github-actions/.github/workflows/promote.yml@v3.0.0
2730
with:
2831
version-package: package.json
2932
git-add-files: package.json

0 commit comments

Comments
 (0)