description: 'Log level'
required: true
default: 'warning'
+ tag:
+ description: 'Tag to set on docker image (e.g. 0.0.1'
+ required: true
jobs:
buildx:
steps:
- name: Checkout
uses: actions/checkout@v2
- - uses: oprypin/find-latest-tag@v1
- with:
- repository: music-assistant/server # The repository to scan.
- releases-only: true # We know that all relevant tags have a GitHub release for them.
- id: mass # The step ID to refer to later.
+
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/music-assistant
VERSION=latest
- SHORTREF=${{ steps.mass.outputs.tag }}
+ SHORTREF=${GITHUB_SHA::8}
+ # If a manual tag was supplied, use that
+ if [[ -n $github.event.inputs.tag ]]; then
+ VERSION=${github.event.inputs.tag}
+
# If this is git tag, use the tag name as a docker tag
- if [[ $GITHUB_REF == refs/tags/* ]]; then
+ elif [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
fi
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"