Skip to content

Commit

Permalink
Fix syntax and varaible subs in workflow file.
Browse files Browse the repository at this point in the history
The previous version did not include the "actions" prefix on the
checkout task. Substitution and filtering of the version variable was
also improved to match that of the release workflow.

Eventually we will want to reuse more job artifacts instead of running
builds and documentation multiple times.
  • Loading branch information
Christopher Palmer-Richez committed Aug 7, 2024
1 parent 5339c38 commit 43729c6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
name: Deploy collection to galaxy
name: publish
on:
release:
types:
Expand All @@ -10,18 +9,18 @@ jobs:
name: Publish to Galaxy
runs-on: ubuntu-latest
steps:
- uses: checkout@v4
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Build collection
run: ansible-galaxy collection build

- name: Get expected version string
shell: VERSION=$(echo ${{ github.ref_name }} | sed -e 's/v\(.*\)/\1/'
shell: echo "VERSION={$GITHUB_REF_NAME:1}" >> "$GITHUB_ENV"

- name: Publish to Galaxy
run: |
ansible-galaxy collection publish \
tofugarden-secureboot-$VERSION.tar.gz \
tofugarden-secureboot-${{ env.VERSION }}.tar.gz \
--token ${{ secrets.GALAXY_API_KEY }}

0 comments on commit 43729c6

Please sign in to comment.