-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (53 loc) · 1.65 KB
/
push.yml
File metadata and controls
54 lines (53 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Automated Release
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
uses: ./.github/workflows/build.yml
release-please:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GH_TOKEN }}
- run: "echo 'Outputs: ${{ toJSON(steps.release.outputs) }}'"
outputs:
release_created: ${{ steps.release.outputs.releases_created }}
version: ${{ steps.release.outputs['standalone--tag_name'] }}
docker-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
uses: ./.github/workflows/build-docker.yml
secrets: inherit
with:
tag: ${{ needs.release-please.outputs.version }}
deploy-worker:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
environment: cloudflare-worker
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
notify:
runs-on: ubuntu-latest
needs: [release-please, docker-publish, deploy-worker]
if: ${{ needs.release-please.outputs.release_created == 'true' }}
steps:
- name: Discord notification
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "Version ${{ needs.release-please.outputs.version }} of Hookbuffer has been released!"