Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Fix docker autorelease (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
izellevy authored Jan 17, 2024
1 parent b506e45 commit 10cae12
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ name: Create and publish a Docker image

on:
workflow_dispatch:
inputs:
version:
description: 'Version to tag the image with'
required: true
type: string
workflow_call:
inputs:
version:
description: 'Version to tag the image with'
required: true
type: string
push:
branches:
- 'main'
Expand Down Expand Up @@ -31,10 +42,12 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/pinecone-io/canopy
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=ref,event=branch,enable=${{ github.event_name == 'push' }}
type=semver,pattern={{version}},enable=${{ github.event_name == 'push' }}
type=raw,value=latest,enable=${{ github.event_name != 'push' }}
type=raw,value=${{inputs.version}},enable=${{ github.event_name != 'push' }}
- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,8 @@ jobs:
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
publish-image:
needs: [build, publish]
uses: ./.github/workflows/build-push-image.yml
with:
version: ${{ needs.build.outputs.new_version }}

0 comments on commit 10cae12

Please sign in to comment.