Skip to content

Commit b673206

Browse files
test fix github actions
1 parent af2ca3e commit b673206

File tree

1 file changed

+18
-25
lines changed

1 file changed

+18
-25
lines changed

.github/workflows/docker-image.yml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,29 @@ on:
55
types: [published]
66

77
jobs:
8-
main:
8+
push_to_registry:
9+
name: Push Docker image to Docker Hub
910
runs-on: ubuntu-latest
1011
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
2123
with:
2224
username: ${{ secrets.DOCKERHUB_USERNAME }}
2325
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
3228
uses: docker/build-push-action@v2
3329
with:
30+
context: .
3431
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 }}

0 commit comments

Comments
 (0)