Skip to content

Commit 91e7519

Browse files
committed
Add condition to running gh release.
1 parent 40eeef1 commit 91e7519

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
run: ./gradlew build --info --init-script init.gradle -PversionOverride=$VERSION
7575
- name: Create GitHub Release
7676
id: create_release
77+
# Allow testing withing creating a release
78+
if: github.event_name != 'pull_request'
7779
uses: softprops/action-gh-release@v2.1.0
7880
with:
7981
files: cwms-data-api/build/libs/cwms-data-api-${{env.VERSION}}.war
@@ -93,6 +95,8 @@ jobs:
9395
type=sha
9496
type=ref,event=tag
9597
type=schedule,pattern=nightly
98+
type=schedule,pattern={{date 'YYYY.MM.DD'}}
99+
type=schedule,pattern={{date 'YYYY.MM.DD-hhmmss'}}
96100
- name: Log in to the Container registry
97101
id: login-ghcr
98102
uses: docker/login-action@v3.3.0
@@ -110,6 +114,8 @@ jobs:
110114
- name: Build and push
111115
uses: docker/build-push-action@v6.16.0
112116
with:
117+
context: "."
118+
# This is not conditional on pull_request as we want access to these if we are manually running it.
113119
push: true
114120
tags: ${{ steps.meta.outputs.tags }}
115121
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)