Skip to content

Commit

Permalink
ci(release) Add input on build workflow to prevent deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelien-baudet committed Jan 11, 2021
1 parent 8183efd commit 4cde86e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ on:
branches-ignore:
- 'gh-*'
- 'docs/**'
workflow_dispatch:
workflow_dispatch:
inputs:
deploy:
description: 'Deploy on Maven repository'
required: true
default: false

jobs:
build:
Expand Down Expand Up @@ -471,7 +476,7 @@ jobs:
fail_on_test_failures: true

deploy:
if: github.ref == 'refs/heads/master'
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == true)
needs: [classpath-tests-standalone, classpath-tests-spring-boot-legacy, classpath-tests-spring-boot, javadoc, analyze-sonar, analyze-codecov]
runs-on: ubuntu-18.04
name: "Deploy"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
token: ${{ secrets.DEV_REPORTS_GITHUB_TOKEN }}
- name: "Add branch site to reports"
run: |
BRANCH="${GITHUB_REF#refs/heads}"
BRANCH="${GITHUB_REF#refs/heads/}"
ci/./deploy-dev-reports.sh $BRANCH ${{ github.workspace }}/ogham-dev-reports
slack-success:
Expand All @@ -138,7 +138,7 @@ jobs:
runs-on: ubuntu-18.04
name: "Slack"
steps:
- run: echo "BRANCH=${GITHUB_REF#refs/heads}" >> $GITHUB_ENV
- run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- uses: 8398a7/action-slack@v3
with:
text: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ jobs:
needs: [release]
runs-on: ubuntu-18.04
steps:
- run: echo "disabled"
- uses: aurelien-baudet/workflow-dispatch@v2
with:
token: ${{ secrets.TRIGGER_WORKFLOW_TOKEN }}
Expand Down

0 comments on commit 4cde86e

Please sign in to comment.