File tree Expand file tree Collapse file tree 1 file changed +18
-25
lines changed Expand file tree Collapse file tree 1 file changed +18
-25
lines changed Original file line number Diff line number Diff line change 5
5
types : [published]
6
6
7
7
jobs :
8
- main :
8
+ push_to_registry :
9
+ name : Push Docker image to Docker Hub
9
10
runs-on : ubuntu-latest
10
11
steps :
11
- # in the future we'll add an arm image for the raspberry
12
- -
13
- name : Set up QEMU
14
- uses : docker/setup-qemu-action@v1
15
- -
16
- name : Set up Docker Buildx
17
- uses : docker/setup-buildx-action@v1
18
- -
19
- name : Login to DockerHub
20
- uses : docker/login-action@v1
12
+ - name : Check out the repo
13
+ uses : actions/checkout@v2
14
+
15
+ - name : Extract metadata for Docker
16
+ id : meta
17
+ uses : docker/metadata-action@v3
18
+ with :
19
+ images : livingwithhippos/unchainedbotkotlin
20
+
21
+ - name : Log in to DockerHub
22
+ uses : docker/login-action@v1
21
23
with :
22
24
username : ${{ secrets.DOCKERHUB_USERNAME }}
23
25
password : ${{ secrets.DOCKER_PASSWORD }}
24
- -
25
- name : Set variables
26
- run : |
27
- VER=$( grep -E '^version' build.gradle.kts | cut -d '"' -f 2 )
28
- echo "CURRENT_VERSION=$VER" >> $GITHUB_ENV
29
- -
30
- name : Build and push
31
- id : docker_build
26
+
27
+ - name : Build and push Docker image
32
28
uses : docker/build-push-action@v2
33
29
with :
30
+ context : .
34
31
push : true
35
- tags : |
36
- livingwithhippos/unchainedbotkotlin:latest
37
- livingwithhippos/unchainedbotkotlin:${{ env.CURRENT_VERSION }}
38
- -
39
- name : Image digest
40
- run : echo ${{ steps.docker_build.outputs.digest }}
32
+ tags : ${{ steps.meta.outputs.tags }}
33
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments