Skip to content

build: add docker scripts #1

build: add docker scripts

build: add docker scripts #1

Workflow file for this run

name: Publish Docker image
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
REPO_NAME: ${{ github.event.repository.name }}
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_TOKEN
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
tags: $DOCKERHUB_USERNAME/$REPO_NAME:latest
push: true
release:
runs-on: ubuntu-latest
needs: publish
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Create a new release
run: gh release create ${{ github.ref }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}