Skip to content

Commit

Permalink
test fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LivingWithHippos committed Jan 17, 2022
1 parent af2ca3e commit b673206
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,29 @@ on:
types: [published]

jobs:
main:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
# in the future we'll add an arm image for the raspberry
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
- name: Check out the repo
uses: actions/checkout@v2

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: livingwithhippos/unchainedbotkotlin

- name: Log in to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Set variables
run: |
VER=$( grep -E '^version' build.gradle.kts | cut -d '"' -f 2 )
echo "CURRENT_VERSION=$VER" >> $GITHUB_ENV
-
name: Build and push
id: docker_build

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
livingwithhippos/unchainedbotkotlin:latest
livingwithhippos/unchainedbotkotlin:${{ env.CURRENT_VERSION }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b673206

Please sign in to comment.