Skip to content

Publish "test" Docker image #1

Publish "test" Docker image

Publish "test" Docker image #1

name: Publish "test" Docker image
on:
workflow_dispatch:
jobs:
publish:
name: Publish to Docker Hub
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: bjornoleh/nightscout
PLATFORMS: linux/amd64,linux/arm64
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Clean git Checkout
if: success()
uses: actions/checkout@v3
- name: Build, tag and push the test Docker image
if: success()
uses: docker/build-push-action@v2
with:
context: .
push: true
no-cache: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.DOCKER_IMAGE }}:test_${{ github.sha }}
${{ env.DOCKER_IMAGE }}:latest_test