Skip to content

Docker packaging

Docker packaging #32

Workflow file for this run

name: Docker packaging
on:
push:
tags:
- 'basedon-*'
jobs:
main:
runs-on: ubuntu-latest
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: Environment variables
run: env
-
name: Create images
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
DOCKERHUB_REPO: ${{ vars.DOCKERHUB_REPO }}
shell: bash
run: |
LATEST_TAG=${GITHUB_REF#refs/tags/}
LATEST_TAG=${LATEST_TAG:8} #trim "basedon-" from tag
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
docker buildx create --use
DOCKER_BUILDX_OPTS="--platform linux/amd64,linux/arm64,linux/arm/v7 --push"
docker buildx build $DOCKER_BUILDX_OPTS -t $DOCKERHUB_REPO:$LATEST_TAG .