-
-
Notifications
You must be signed in to change notification settings - Fork 30
72 lines (64 loc) · 1.95 KB
/
docker.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
on:
push:
branches:
- stable
- beta
tags:
- '**'
name: Build and push docker image
jobs:
build:
name: Build and push docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/setup-buildx-action@v2
- uses: docker/metadata-action@v4
id: meta
with:
images: ghcr.io/freefeed/freefeed-react-client
tags: |
type=ref,event=branch
type=ref,event=pr
type=match,pattern=freefeed_release_(.*),group=1
- uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
needs: build
name: Trigger deploy
runs-on: ubuntu-latest
steps:
- name: Get release version
if: startsWith(github.ref, 'refs/tags/')
id: version
shell: bash
run: echo "version=${GITHUB_REF#refs/tags/freefeed_release_}" >> $GITHUB_OUTPUT
env:
GITHUB_REF: ${{ github.ref }}
- name: Deploy release
if: startsWith(github.ref, 'refs/tags/')
uses: satak/webrequest-action@v1.2.4
with:
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/react-client/release?version=${{ steps.version.outputs.version }}"
method: GET
- name: Deploy stable
if: github.ref == 'refs/heads/stable'
uses: satak/webrequest-action@v1.2.4
with:
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/react-client/stable?version=stable"
method: GET
- name: Deploy beta
if: github.ref == 'refs/heads/beta'
uses: satak/webrequest-action@v1.2.4
with:
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/react-client/beta?version=beta"
method: GET