Skip to content

Commit

Permalink
Update publish_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynduby authored Jan 14, 2025
1 parent 97f1fb8 commit 67d506e
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ name: Publish Release

on:
schedule:
# At 0:00am each day on the default branch
- cron: '0 0 * * *'
on: workflow_dispatch
workflow_dispatch:
inputs:
tag:
Expand All @@ -29,25 +28,7 @@ on:
type: boolean

jobs:
# checks if there's a commit in last 24hr
check_date:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}

- id: should_run
continue-on-error: true
name: check latest commit is less than a day
run: |
test -z $(git rev-list --after="24 hours" ${{ github.sha }}) \
&& (gh run cancel ${{ github.run_id }} \
&& gh run watch ${{ github.run_id }})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_release:
needs: check_date
runs-on: ubuntu-latest
container: maven:3-eclipse-temurin-8
steps:
Expand Down

0 comments on commit 67d506e

Please sign in to comment.