Skip to content

Commit

Permalink
fix: release context doesn't exist if triggering with workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
strophy committed Jun 29, 2023
1 parent 13604be commit 199378e
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ jobs:
with:
result-encoding: string
script: |
let tag = context.payload.release.tag_name;
if (context.eventName === 'workflow_dispatch') {
tag = '${{ github.event.inputs.tag }}';
}
return tag;
return (
context.eventName === 'workflow_dispatch'
? '${{ github.event.inputs.tag }}'
: context.payload.release.tag_name
);
- name: Build Docker image
uses: ./.github/actions/docker
Expand All @@ -118,11 +118,11 @@ jobs:
with:
result-encoding: string
script: |
let tag = context.payload.release.tag_name;
if (context.eventName === 'workflow_dispatch') {
tag = '${{ github.event.inputs.tag }}';
}
return tag;
return (
context.eventName === 'workflow_dispatch'
? '${{ github.event.inputs.tag }}'
: context.payload.release.tag_name
);
- name: Build Docker image
uses: ./.github/actions/docker
Expand All @@ -148,11 +148,11 @@ jobs:
with:
result-encoding: string
script: |
let tag = context.payload.release.tag_name;
if (context.eventName === 'workflow_dispatch') {
tag = '${{ github.event.inputs.tag }}';
}
return tag;
return (
context.eventName === 'workflow_dispatch'
? '${{ github.event.inputs.tag }}'
: context.payload.release.tag_name
);
- name: Build Docker image
uses: ./.github/actions/docker
Expand All @@ -177,11 +177,11 @@ jobs:
with:
result-encoding: string
script: |
let tag = context.payload.release.tag_name;
if (context.eventName === 'workflow_dispatch') {
tag = '${{ github.event.inputs.tag }}';
}
return tag;
return (
context.eventName === 'workflow_dispatch'
? '${{ github.event.inputs.tag }}'
: context.payload.release.tag_name
);
- name: Build Docker image
uses: ./.github/actions/docker
Expand All @@ -207,11 +207,11 @@ jobs:
with:
result-encoding: string
script: |
let tag = context.payload.release.tag_name;
if (context.eventName === 'workflow_dispatch') {
tag = '${{ github.event.inputs.tag }}';
}
return tag;
return (
context.eventName === 'workflow_dispatch'
? '${{ github.event.inputs.tag }}'
: context.payload.release.tag_name
);
- name: Build Docker image
uses: ./.github/actions/docker
Expand Down

0 comments on commit 199378e

Please sign in to comment.