Updates instructions for install types #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# Instruqt Github Actions Workflow | |
# | |
# This workflow will generate the track-slugs.yml file | |
# | |
############################################################################## | |
name: instruqt-generate | |
env: | |
INSTRUQT_TOKEN: ${{ secrets.INSTRUQT_TOKEN }} | |
TRACK_DIR: instruqt | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
jobs: | |
CreateTrackSlugs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Find track descriptors | |
id: find-track-descriptors | |
run: | | |
files=$(find instruqt -name 'track.yml' -print0 | xargs -0 echo) | |
echo "files=$files" >> $GITHUB_OUTPUT | |
- name: Get the track slugs and IDs | |
id: get-track-slugs | |
uses: mikefarah/yq@master | |
with: | |
cmd: | | |
yq eval-all 'select(.id != null and .slug != null and ( contains({ "tags": "deprecated"}) | not ) and ( contains({ "tags": "template" } ) | not) and ( contains( { "tags": "internal" } ) | not ) ) | . as $item ireduce ([]; . + [{"slug": $item.slug, "id": $item.id}]) | {"tracks": . }' | |
- name: Update track slugs metadata | |
id: update-slugs | |
run: | | |
echo '${{ steps.get-track-slugs.outputs.result }}' > instruqt/track-slugs.yml | |
- name: Commit Changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Generating track-slugs.yml file |