-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start on workflow for releasing to moduletests
- Loading branch information
ITViking
committed
Dec 4, 2024
1 parent
be13d4f
commit 18c592c
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deploy new release to moduletests | ||
|
||
on: | ||
workflow_dispatch: # Allows manual trigger | ||
|
||
jobs: | ||
find-all-moduletest-sites: | ||
name: Get list of moduletest sites | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install yq | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y jq | ||
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq | ||
chmod +x /usr/bin/yq | ||
- name: Extract site keys with "webmaster" plan | ||
id: parse-sites | ||
run: | | ||
site_keys=$(yq '.sites | to_entries | map(select(.value.plan == "webmaster")) | map(.key) | join(",")' ./infrastructure/environments/dplplat01/sites.yaml) | ||
echo "Webmaster site keys: $site_keys" | ||
echo "webmasters=[$site_keys]" | ||
deploy-new-release: | ||
name: Deploy new release | ||
needs: [ find-all-moduletest-sites ] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
value: ${{fromJSON(needs.find-all-moduletest-sites.outputs.webmasters)}} | ||
|
||
steps: | ||
- run: | | ||
echo "${{matrix.value}}" |