Skip to content

Commit

Permalink
add feature based on Gabe's feedback to checkout the right zarf versi…
Browse files Browse the repository at this point in the history
…on to avoid injector to version mismatch
  • Loading branch information
mcamick committed Oct 6, 2024
1 parent 66585d0 commit 8dead39
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/update-zarf-injector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Fetch zarf-config.toml from zarf-dev
- name: Extract Zarf version
id: zarf_version
run: |
# Extract the Zarf version from the zarf-config.yaml file
zarf_version=$(grep 'injector_version:' zarf-config.yaml | cut -d'"' -f2)
echo "Zarf Version: $zarf_version"
echo "zarf_version=$zarf_version" >> $GITHUB_ENV
- name: Clone zarf-dev repository and checkout version
run: |
git clone https://github.com/zarf-dev/zarf.git
cp zarf/zarf-config.toml .
cd zarf
git checkout ${{ env.zarf_version }} # Use the dynamically extracted version
cp zarf-config.toml ../
cd ..
- name: Parse and update zarf-config.yaml
run: |
Expand Down

0 comments on commit 8dead39

Please sign in to comment.