Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Docker

Docker #190

Workflow file for this run

name: Docker
on:
push:
branches:
- main
tags:
- v*
schedule:
- cron: '47 19 * * *'
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Prepare
id: prep
run: |
REPONAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]' )
DOCKER_IMAGE=ghcr.io/$REPONAME
TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${{ steps.get_version.outputs.VERSION }}"
echo ::set-output name=tags::${TAGS}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.prep.outputs.tags }}