From b673206dd90b62c217d22c06f4d3c40b0bdf66e5 Mon Sep 17 00:00:00 2001 From: LivingWithHippos Date: Mon, 17 Jan 2022 10:39:26 +0100 Subject: [PATCH] test fix github actions --- .github/workflows/docker-image.yml | 43 +++++++++++++----------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c2d61d5..63f320d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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 }} \ No newline at end of file