Skip to content

Commit

Permalink
Fix CML version on container images (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 committed May 10, 2024
1 parent d9aa754 commit f6e7833
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
release:
required: true
type: boolean
version:
required: false
type: string
jobs:
images:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -33,8 +36,11 @@ jobs:
fetch-depth: 0
- name: Metadata
id: metadata
env:
CML_VERSION: ${{ inputs.version }}
run: |
latest_tag=$(git describe --tags | cut -d- -f1)
test -n "$CML_VERSION" && latest_tag="$CML_VERSION"
cml_version=${latest_tag##v}
dvc_version=$(python3 -c '
from distutils.version import StrictVersion as Ver
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
packages:
needs: [lint, test, test-os]
runs-on: ubuntu-latest
outputs:
version: ${{ steps.publish.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -106,8 +108,10 @@ jobs:
with:
registry-url: https://registry.npmjs.org
- run: npm install
- run: |
- id: publish
run: |
VERSION=$(jq -r .version < package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
npm install --dry-run @dvcorg/cml@$VERSION ||
npm ${{ inputs.release && 'publish' || 'publish --dry-run' }}
env:
Expand All @@ -133,3 +137,4 @@ jobs:
uses: ./.github/workflows/images.yml
with:
release: ${{ inputs.release || false }}
version: ${{ needs.packages.outputs.version }}

0 comments on commit f6e7833

Please sign in to comment.