Compare commits
1 Commits
4a9d85d9e7
...
5308b0f2aa
Author | SHA1 | Date | |
---|---|---|---|
5308b0f2aa |
@ -2,46 +2,14 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 9 * * 0"
|
- cron: "0 9 * * 0"
|
||||||
issue_comment:
|
- cron: "0 0 * * *" # Testing
|
||||||
types: [created]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_manual_trigger:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Log event metadata
|
|
||||||
run: |
|
|
||||||
echo "Issue: ${{ gitea.event.issue.number }}"
|
|
||||||
echo "Comment: ${{ gitea.event.comment.body }}"
|
|
||||||
echo "User: ${{ gitea.event.comment.user.login }}"
|
|
||||||
|
|
||||||
- name: Stop workflow if required conditions are not met
|
|
||||||
if: ${{ !contains(gitea.event.issue.number, '436') || !contains(gitea.event.comment.body, '/trigger-release') || !contains(gitea.event.comment.user.login, 'luke') }}
|
|
||||||
run: exit 1
|
|
||||||
|
|
||||||
get_latest_tag:
|
|
||||||
name: Get latest tag
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: check_manual_trigger
|
|
||||||
outputs:
|
|
||||||
latesttag: ${{ steps.latesttag.outputs.latesttag }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.7
|
|
||||||
- name: Get latest tag
|
|
||||||
id: latesttag
|
|
||||||
run: |
|
|
||||||
git fetch --tags
|
|
||||||
echo "latesttag=$(git describe --tags --abbrev=0)" >> "$GITEA_OUTPUT"
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Unit Test
|
uses: https://git.tainton.uk/public/webexmemebot/src/branch/main/.gitea/workflows/ci.yml
|
||||||
needs: get_latest_tag
|
|
||||||
uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@${{ needs.get_latest_tag.outputs.latesttag }}
|
|
||||||
|
|
||||||
create_release:
|
create_release:
|
||||||
name: Create Release
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
|
||||||
outputs:
|
outputs:
|
||||||
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||||
success: ${{ steps.set_flag.outputs.success }}
|
success: ${{ steps.set_flag.outputs.success }}
|
||||||
|
Loading…
Reference in New Issue
Block a user