Skip to content

Commit 4cde86e

Browse files
ci(release) Add input on build workflow to prevent deploy
1 parent 8183efd commit 4cde86e

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ on:
55
branches-ignore:
66
- 'gh-*'
77
- 'docs/**'
8-
workflow_dispatch:
8+
workflow_dispatch:
9+
inputs:
10+
deploy:
11+
description: 'Deploy on Maven repository'
12+
required: true
13+
default: false
914

1015
jobs:
1116
build:
@@ -471,7 +476,7 @@ jobs:
471476
fail_on_test_failures: true
472477

473478
deploy:
474-
if: github.ref == 'refs/heads/master'
479+
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == true)
475480
needs: [classpath-tests-standalone, classpath-tests-spring-boot-legacy, classpath-tests-spring-boot, javadoc, analyze-sonar, analyze-codecov]
476481
runs-on: ubuntu-18.04
477482
name: "Deploy"

.github/workflows/generate-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
token: ${{ secrets.DEV_REPORTS_GITHUB_TOKEN }}
130130
- name: "Add branch site to reports"
131131
run: |
132-
BRANCH="${GITHUB_REF#refs/heads}"
132+
BRANCH="${GITHUB_REF#refs/heads/}"
133133
ci/./deploy-dev-reports.sh $BRANCH ${{ github.workspace }}/ogham-dev-reports
134134
135135
slack-success:
@@ -138,7 +138,7 @@ jobs:
138138
runs-on: ubuntu-18.04
139139
name: "Slack"
140140
steps:
141-
- run: echo "BRANCH=${GITHUB_REF#refs/heads}" >> $GITHUB_ENV
141+
- run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
142142
- uses: 8398a7/action-slack@v3
143143
with:
144144
text: |

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ jobs:
119119
needs: [release]
120120
runs-on: ubuntu-18.04
121121
steps:
122-
- run: echo "disabled"
123122
- uses: aurelien-baudet/workflow-dispatch@v2
124123
with:
125124
token: ${{ secrets.TRIGGER_WORKFLOW_TOKEN }}

0 commit comments

Comments
 (0)