Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-2282 Add Docker tags for Major and Major.Minor versions #2285

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,20 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Generate Docker Tags"
id: generate-tags
run: |
VERSION="${{ needs.github.outputs.version }}"
MAJOR=$(echo $VERSION | cut -d '.' -f 1)
MINOR=$(echo $VERSION | cut -d '.' -f 2)

echo "::set-output name=tags::dzikoysk/reposilite:latest,dzikoysk/reposilite:${VERSION},dzikoysk/reposilite:${MAJOR},dzikoysk/reposilite:${MAJOR}.${MINOR},ghcr.io/dzikoysk/reposilite:latest,ghcr.io/dzikoysk/reposilite:${VERSION},ghcr.io/dzikoysk/reposilite:${MAJOR},ghcr.io/dzikoysk/reposilite:${MAJOR}.${MINOR}"

- name: "Build and push"
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
platforms: "linux/amd64,linux/arm64"
push: true
tags: |
dzikoysk/reposilite:latest
dzikoysk/reposilite:${{ needs.github.outputs.version }}
ghcr.io/dzikoysk/reposilite:latest
ghcr.io/dzikoysk/reposilite:${{ needs.github.outputs.version }}
tags: ${{ steps.generate-tags.outputs.tags }}
Loading