|
@@ -0,0 +1,37 @@
|
|
1
|
+name: 'ghcr'
|
|
2
|
+
|
|
3
|
+on:
|
|
4
|
+ push:
|
|
5
|
+ branches:
|
|
6
|
+ - "master"
|
|
7
|
+ - "stable"
|
|
8
|
+ tags:
|
|
9
|
+ - 'v*'
|
|
10
|
+
|
|
11
|
+jobs:
|
|
12
|
+ build:
|
|
13
|
+ name: 'Build'
|
|
14
|
+ runs-on: ubuntu-latest
|
|
15
|
+ steps:
|
|
16
|
+ - name: "Build:checkout"
|
|
17
|
+ uses: actions/checkout@v2
|
|
18
|
+ - name: "Build:meta"
|
|
19
|
+ id: meta
|
|
20
|
+ uses: docker/metadata-action@v3
|
|
21
|
+ with:
|
|
22
|
+ images: ghcr.io/ergochat/ergo
|
|
23
|
+ - name: "Build:login"
|
|
24
|
+ uses: docker/login-action@v1
|
|
25
|
+ if: github.event_name != 'pull_request'
|
|
26
|
+ with:
|
|
27
|
+ registry: ghcr.io
|
|
28
|
+ username: ${{ github.repository_owner }}
|
|
29
|
+ password: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+ - name: 'Build:dockerimage'
|
|
31
|
+ uses: docker/build-push-action@v2
|
|
32
|
+ with:
|
|
33
|
+ context: .
|
|
34
|
+ github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
+ push: ${{ github.event_name != 'pull_request' }}
|
|
36
|
+ tags: ${{ steps.meta.outputs.tags }}
|
|
37
|
+ labels: ${{ steps.meta.outputs.labels }}
|