We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 58a3ec0 + 30a450f commit 79bdcb6Copy full SHA for 79bdcb6
1 file changed
.github/workflows/publish_docker.yml
@@ -0,0 +1,40 @@
1
+name: ci
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - 'main'
7
+ tags:
8
+ - 'v*'
9
+ pull_request:
10
11
12
13
+jobs:
14
+ docker:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ -
18
+ name: Checkout
19
+ uses: actions/checkout@v3
20
21
+ name: Docker meta
22
+ id: meta
23
+ uses: docker/metadata-action@v4
24
+ with:
25
+ images: name/app
26
27
+ name: Login to DockerHub
28
+ if: github.event_name != 'pull_request'
29
+ uses: docker/login-action@v2
30
31
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
32
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
33
34
+ name: Build and push
35
+ uses: docker/build-push-action@v3
36
37
+ context: .
38
+ push: ${{ github.event_name != 'pull_request' }}
39
+ tags: ${{ steps.meta.outputs.tags }}
40
+ labels: ${{ steps.meta.outputs.labels }}
0 commit comments