handle latest tag in docker release

This commit is contained in:
mungai-njoroge 2023-10-13 20:18:12 +03:00
parent 8069eb5496
commit 5dc28fbae6
2 changed files with 11 additions and 4 deletions

View File

@ -6,7 +6,7 @@ on:
description: "Tag"
required: true
default: "v1.x.x"
latest:
is_latest:
description: "Set as latest"
required: true
default: "true"
@ -113,6 +113,7 @@ jobs:
artifactErrorsFailBuild: true
name: ${{ inputs.tag }}
bodyFile: .github/changelog.md
makeLatest: ${{ inputs.is_latest }}
docker:
runs-on: ubuntu-latest
needs: build
@ -164,5 +165,7 @@ jobs:
context: .
platforms: linux/amd64,linux/arm
push: true
tags: ghcr.io/${{github.repository}}:${{inputs.tag}}
labels: ${{ steps.meta.outputs.labels }}w
tags: ghcr.io/${{github.repository}}:${{inputs.tag}}, ${{env.LATEST_TAG}}
labels: ${{ steps.meta.outputs.labels }}
env:
LATEST_TAG: ${{ inputs.is_latest == 'true' && join('ghcr.io/', join(github.repository, ':latest')) || '' }}

View File

@ -52,7 +52,11 @@ The link to access the app will be printed on your terminal. Copy it and open it
### Docker
You can run Swing Music in a Docker container. To do so, clone the repository and build the image:
Pull the latest Docker image and run it:
```sh
docker pull ghcr.io/swing-opensource/swingmusic:v1.3.0
```
```bash
git clone https://github.com/swing-opensource/swingmusic.git --depth 1