Skip to content

Commit

Permalink
Merge pull request #28 from SkynetLabs/sevey/clean-up-action
Browse files Browse the repository at this point in the history
clean up github action
  • Loading branch information
MSevey authored May 24, 2022
2 parents 1271d8c + 593c4b9 commit 348bc46
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Release
on:
push:
# Nightly schedule pending full e2e testing with other repos
#schedule:
# Run daily at 1:15am
#- cron: "15 1 * * *"
branches: [main]
pull_request:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
Expand Down Expand Up @@ -41,27 +39,11 @@ jobs:
- name: Run unit tests
run: make test

# Check if there were any changes since the last tag if this is not a push
# event
changes:
needs: [hadolint, test]
runs-on: ubuntu-latest
outputs:
updates: ${{steps.changes.outputs.any == 'true'}}
if: ${{ github.event_name != 'push' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags
- uses: SkynetLabs/.github/.github/actions/changes-since-last-tag@master

# Make a release if
# - there were changes and this is a scheduled job
# - This is a manually trigger job, i.e. workflow_dispatch
# Make a release if this is a manually trigger job, i.e. workflow_dispatch
release:
needs: changes
needs: [hadolint, test]
runs-on: ubuntu-latest
if: ${{ (needs.changes.outputs.updates == 'true' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch' }}
if: ${{ github.event_name == 'workflow_dispatch' }}
outputs:
new_version: ${{ steps.version.outputs.new-version }}
steps:
Expand Down

0 comments on commit 348bc46

Please sign in to comment.