chore(deps): update dependency argoproj/argo-cd to v2.14.1 #91
Workflow file for this run
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
name: PR Collection Build | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
paths: | |
- 'collections/**' | |
jobs: | |
Analyze-Collection-Config: | |
container: | |
image: ghcr.io/stuttgart-things/github.com/stuttgart-things/machineshop:v2.6.13 | |
environment: k8s | |
outputs: | |
collection_folders: ${{ steps.changed-files.outputs.collection_folders }} | |
runs-on: ghr-ansible-skyami-cicd | |
steps: | |
- name: Get Modified Files by PullRequest | |
id: changed-files | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
FILES=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ | |
"${{ github.event.pull_request.url }}/files" | \ | |
jq -r '.[].filename') | |
echo "ALL_CHANGED_FILES=${FILES}" | |
ALL_CHANGED_FOLDERS=$(echo "$FILES" | tr ' ' '\n' | while read file; do dirname "$file"; done | sort | uniq | paste -sd ',') | |
ALL_CHANGED_FOLDERS=$(echo "$ALL_CHANGED_FOLDERS" | tr ',' '\n' | grep '^collections/' | tr '\n' ',') | |
# Remove trailing comma if present | |
ALL_CHANGED_FOLDERS=${ALL_CHANGED_FOLDERS%,} | |
echo "ALL_CHANGED_FOLDERS=${ALL_CHANGED_FOLDERS}" | |
# SET CHANGED_FOLDERS AS MATRIX JSON | |
tf_folders=$(echo "\"${ALL_CHANGED_FOLDERS}\"" | sed 's/,/", "/g') | |
JSON_FOLDERS='{ "collection-directory": ['"${tf_folders}"'] }' | |
echo ${JSON_FOLDERS} | |
echo "collection_folders=${JSON_FOLDERS}" >> "$GITHUB_OUTPUT" | |
Build-Collections: | |
needs: Analyze-Collection-Config | |
if: ${{ needs.Analyze-Collection-Config.outputs.collection_folders != '[]' && needs.Analyze-Collection-Config.outputs.collection_folders != '' }} | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.Analyze-Collection-Config.outputs.collection_folders) }} | |
uses: stuttgart-things/github-workflow-templates/.github/workflows/call-ansible-collection.yaml@feature/add-homerun-task-go | |
with: | |
runs-on: dagger | |
environment-name: k8s | |
collection-directory: ${{ matrix.collection-directory }} | |
dagger-module-version: v0.2.1 | |
branch-name: ${{ github.event.pull_request.head.ref }} | |
secrets: inherit # pragma: allowlist secret |