Skip to content

Commit

Permalink
fix: allow ci-release workflow to be dispatched
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 25, 2022
1 parent 49a17fe commit b836015
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 22 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci-release.yml
Expand Up @@ -3,6 +3,12 @@
name: CI - Release

on:
workflow_dispatch:
inputs:
ref:
required: true
type: string
default: main
workflow_call:
inputs:
ref:
Expand All @@ -23,7 +29,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6

if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Lint All"
Expand Down Expand Up @@ -57,7 +63,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check

if: inputs.check-sha
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -124,7 +130,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6

if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Test All"
Expand Down Expand Up @@ -158,7 +164,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check

if: inputs.check-sha
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down
10 changes: 8 additions & 2 deletions lib/content/ci-release.yml
Expand Up @@ -2,6 +2,12 @@
name: CI - Release

on:
workflow_dispatch:
inputs:
ref:
required: true
type: string
default: {{ defaultBranch }}
workflow_call:
inputs:
ref:
Expand All @@ -15,7 +21,7 @@ jobs:
lint-all:
{{> job
jobName="Lint All"
jobCheck=(obj sha="${{ inputs.check-sha }}")
jobCheck=(obj sha="${{ inputs.check-sha }}" if="inputs.check-sha")
jobCheckout=(obj ref="${{ inputs.ref }}")
}}
{{> stepLint jobRunFlags=allFlags }}
Expand All @@ -24,7 +30,7 @@ jobs:
test-all:
{{> jobMatrix
jobName="Test All"
jobCheck=(obj sha="${{ inputs.check-sha }}")
jobCheck=(obj sha="${{ inputs.check-sha }}" if="inputs.check-sha")
jobCheckout=(obj ref="${{ inputs.ref }}")
}}
{{> stepTest jobRunFlags=allFlags }}
Expand Down
2 changes: 1 addition & 1 deletion lib/content/index.js
Expand Up @@ -116,7 +116,7 @@ module.exports = {
windowsCI: true,
macCI: true,
branches: ['main', 'latest'],
releaseBranches: [],
defaultBranch: 'main',
distPaths: [
'bin/',
'lib/',
Expand Down
3 changes: 0 additions & 3 deletions lib/content/release.yml
Expand Up @@ -7,9 +7,6 @@ on:
{{#each branches}}
- {{ . }}
{{/each}}
{{#each releaseBranches }}
- {{ . }}
{{/each}}
- release/v*

permissions:
Expand Down
42 changes: 30 additions & 12 deletions tap-snapshots/test/apply/source-snapshots.js.test.cjs
Expand Up @@ -210,6 +210,12 @@ jobs:
name: CI - Release
on:
workflow_dispatch:
inputs:
ref:
required: true
type: string
default: main
workflow_call:
inputs:
ref:
Expand All @@ -230,7 +236,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6
if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Lint All"
Expand Down Expand Up @@ -264,7 +270,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check
if: inputs.check-sha
with:
token: \${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -331,7 +337,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6
if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Test All"
Expand Down Expand Up @@ -365,7 +371,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check
if: inputs.check-sha
with:
token: \${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -1806,6 +1812,12 @@ jobs:
name: CI - Release
on:
workflow_dispatch:
inputs:
ref:
required: true
type: string
default: main
workflow_call:
inputs:
ref:
Expand All @@ -1826,7 +1838,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6
if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Lint All"
Expand Down Expand Up @@ -1860,7 +1872,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check
if: inputs.check-sha
with:
token: \${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -1927,7 +1939,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6
if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Test All"
Expand Down Expand Up @@ -1961,7 +1973,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check
if: inputs.check-sha
with:
token: \${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -3410,6 +3422,12 @@ jobs:
name: CI - Release
on:
workflow_dispatch:
inputs:
ref:
required: true
type: string
default: main
workflow_call:
inputs:
ref:
Expand All @@ -3430,7 +3448,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6
if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Lint All"
Expand Down Expand Up @@ -3464,7 +3482,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check
if: inputs.check-sha
with:
token: \${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -3531,7 +3549,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6
if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Test All"
Expand Down Expand Up @@ -3565,7 +3583,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check
if: inputs.check-sha
with:
token: \${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down

0 comments on commit b836015

Please sign in to comment.