46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Release Docker Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get tag name
|
|
id: get_tag
|
|
run: |
|
|
TAG_NAME=${GITHUB_REF#refs/tags/}
|
|
echo "tag_name=${TAG_NAME}" >> $GITHUB_ENV
|
|
|
|
- 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: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push release Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
push: true
|
|
tags: |
|
|
cy01/blackhole:latest
|
|
cy01/blackhole:${{ env.tag_name }}
|
|
build-args: |
|
|
VERSION=${{ env.tag_name }}
|
|
CHANNEL=stable |