Skip to content

Merge pull request #192 from Drazzilb08/dev #31

Merge pull request #192 from Drazzilb08/dev

Merge pull request #192 from Drazzilb08/dev #31

Workflow file for this run

name: Docker Version Release
on:
push:
tags:
- v*
jobs:
docker-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
"BRANCH=${{ steps.extract_branch.outputs.branch }}"
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/daps:${{ steps.get_version.outputs.VERSION }}
ghcr.io/drazzilb08/daps:${{ steps.get_version.outputs.VERSION }}