Skip to content

Add Dockerfile and GH action to push to Docker Hub #1

Add Dockerfile and GH action to push to Docker Hub

Add Dockerfile and GH action to push to Docker Hub #1

Workflow file for this run

name: publish-to-docker
on:
push:
branches:
- "mistress"
jobs:
publish:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code
- name: Set version
run: echo VERSION=`date +%Y%m%d` >> $GITHUB_ENV
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64
tags: ${{ secrets.DOCKER_USERNAME }}/pot_generator:latest,${{ secrets.DOCKER_USERNAME }}/pot_generator:${{ env.VERSION }}