Skip to content

Commit

Permalink
fix: update CI workflow to publish to GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Dec 28, 2020
1 parent 41fc430 commit 702a654
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,6 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}

- name: Generate Docker Tags
if: steps.semantic.outputs.new_release_published == 'true'
id: tags
shell: python
env:
NEW_RELEASE_MAJOR_VERSION: ${{ steps.semantic.outputs.new_release_major_version }}
NEW_RELEASE_MINOR_VERSION: ${{ steps.semantic.outputs.new_release_minor_version }}
NEW_RELEASE_PATCH_VERSION: ${{ steps.semantic.outputs.new_release_patch_version }}
run: |
import os
major, minor, patch, repo = os.environ["NEW_RELEASE_MAJOR_VERSION"], os.environ["NEW_RELEASE_MINOR_VERSION"], os.environ["NEW_RELEASE_PATCH_VERSION"], os.environ["GITHUB_REPOSITORY"]
tags = f"ghcr.io/{repo}:latest,ghcr.io/{repo}:{major}.{minor},ghcr.io/{repo}:{major}.{minor}.{patch}"
print(f"::set-output name=tags::{tags}")
- name: Gather Docker Labels
if: steps.semantic.outputs.new_release_published == 'true'
id: docker_meta
Expand All @@ -296,7 +282,10 @@ jobs:
with:
context: .
push: true
tags: ${{ steps.tags.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
tags: >-
ghcr.io/${{ github.repository }}:latest,
ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }},
ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }}.${{ steps.semantic.outputs.new_release_patch_version }}

0 comments on commit 702a654

Please sign in to comment.