Remove the Dockerfile and GitHub actions workflow.
This commit is contained in:
@@ -1,71 +0,0 @@
|
||||
name: Docker
|
||||
|
||||
# Thanks to Ryan Govostes <https://github.com/rgov> for this workflow.
|
||||
|
||||
# Using 'if:' conditions, the script will not execute the steps
|
||||
# unless it is running out of the 'mikebrady/shairport-sync' GitHub repository.
|
||||
|
||||
on:
|
||||
push:
|
||||
# Publish `master` as Docker `latest` image.
|
||||
branches:
|
||||
- master
|
||||
|
||||
# Publish `1.2.3` tags as releases.
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE_NAME: mikebrady/shairport-sync
|
||||
# DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm64
|
||||
DOCKER_HUB_USER: mikebrady
|
||||
|
||||
jobs:
|
||||
# Build the container image for multiple architectures
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# This unusual setup is due to limitations with `docker buildx`.
|
||||
# See: https://github.com/crazy-max/ghaction-docker-buildx/issues/134
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
if: github.repository == 'mikebrady/shairport-sync'
|
||||
run: |
|
||||
# Map git ref branch or tag name to Docker tag version
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
[ "$VERSION" == "master" ] && VERSION=latest && SHAIRPORT_SYNC_BRANCH=master
|
||||
|
||||
# If tagged with a version, build the same version of Shairport Sync
|
||||
[ "$VERSION" != "latest" ] && SHAIRPORT_SYNC_BRANCH=tags/$VERSION
|
||||
|
||||
# Output build arguments for downstream steps
|
||||
echo ::set-output name=buildx_args::\
|
||||
--platform ${DOCKER_PLATFORMS} \
|
||||
--build-arg SHAIRPORT_SYNC_BRANCH=${SHAIRPORT_SYNC_BRANCH} \
|
||||
--tag ${IMAGE_NAME}:${VERSION} \
|
||||
.
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- uses: crazy-max/ghaction-docker-buildx@v1.2.1
|
||||
|
||||
- name: Build
|
||||
if: github.repository == 'mikebrady/shairport-sync'
|
||||
run: |
|
||||
docker buildx build \
|
||||
--output type=image,push=false \
|
||||
${{ steps.prepare.outputs.buildx_args }}
|
||||
|
||||
- name: Log into registry
|
||||
if: github.event_name == 'push' && github.repository == 'mikebrady/shairport-sync'
|
||||
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login --username $DOCKER_HUB_USER --password-stdin
|
||||
|
||||
- name: Push to registry
|
||||
if: github.event_name == 'push' && github.repository == 'mikebrady/shairport-sync'
|
||||
run: |
|
||||
docker buildx build \
|
||||
--output type=image,push=true \
|
||||
${{ steps.prepare.outputs.buildx_args }}
|
||||
|
||||
Reference in New Issue
Block a user