Skip to content

Commit

Permalink
Publish new provider version
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishfor committed Sep 18, 2024
1 parent 5223124 commit 120b998
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@ jobs:
SPACELIFT_API_KEY_ID: ${{ secrets.SPACELIFT_API_KEY_ID }}
SPACELIFT_API_KEY_SECRET: ${{ secrets.SPACELIFT_API_KEY_SECRET }}
run:
spacectl provider create-version --type=nexus
spacectl provider create-version --type=nexus

- name: Publish provider
if: startsWith(github.ref, 'refs/tags/')
env:
GPG_KEY_ID: ${{ steps.import_gpg.outputs.keyid }}
SPACELIFT_API_KEY_ENDPOINT: https://spacelift.ktl.net
SPACELIFT_API_KEY_ID: ${{ secrets.SPACELIFT_API_KEY_ID }}
SPACELIFT_API_KEY_SECRET: ${{ secrets.SPACELIFT_API_KEY_SECRET }}
run: |
spacectl provider list-versions --type nexus -o json > versions.json
VERSION_ID=$(jq --arg version "${{ github.ref_name }}" '.versions[] | select(.number == $version) | .id' versions.json)
spacectl provider publish-version --type=nexus --version=$VERSION_ID

0 comments on commit 120b998

Please sign in to comment.