Skip to content

v1.6.0-ba9

v1.6.0-ba9 #10

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Docker Image (Release)
on:
release:
types:
- published
permissions:
contents: read
packages: write
env:
TEST_TAG: ${{ github.event.repository.full_name }}:test
jobs:
build_docker_release:
name: Build and Push Docker image
if: github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Buildx
uses: docker/setup-buildx-action@v2
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.event.repository.full_name }}
tags: |
type=match,value=${{ github.event.release.tag_name }},pattern=v(.*),group=1
type=match,value=${{ github.event.release.tag_name }},pattern=v(\d+.\d+.\d+),group=1
type=match,value=${{ github.event.release.tag_name }},pattern=v(\d+.\d+),group=1
type=match,value=${{ github.event.release.tag_name }},pattern=v(\d+),group=1
- name: Tags
run: |
echo "Tags:"
echo "${{ steps.meta.outputs.tags }}"
#- name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and export to Docker
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
- name: Test Docker image
run: |
docker run --rm -i ${{ env.TEST_TAG }} beet version
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/arm/v7,linux/arm64,linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}