Skip to content

Commit

Permalink
Merge branch 'git-commit-push-action-9203225004-windows-full-remote' …
Browse files Browse the repository at this point in the history
…into windows
  • Loading branch information
GuillaumeFalourd authored and GuillaumeFalourd committed May 23, 2024
2 parents d4098f9 + 6cdc1c9 commit bfb74a8
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/workflow-tester97.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Test 97 # Related to SO https://stackoverflow.com/questions/78514157/can-we-put-if-else-condition-on-runs-on-for-the-choice-of-workflow-runner?noredirect=1#comment138418481_78514157

on:
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.object.envRunner }}
strategy:
matrix:
object: [{"envName":"dev", "envRunner":"ubuntu-latest"}, {"envName":"stg", "envRunner":"windows-latest"}, {"envName":"prd", "envRunner":"macos-latest"}]
fail-fast: true
max-parallel: 1
steps:
- run: |
echo ${{ matrix.object.envName }}
37 changes: 37 additions & 0 deletions .github/workflows/workflow-tester98-reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test 98 reusable # Related to SO https://stackoverflow.com/questions/78513070/how-to-send-variables-to-called-workflow-from-the-caller-workflow/78514014?noredirect=1#comment138421206_78514014

on:
workflow_dispatch:
inputs:
cacheName:
type: string
description: 'Provide Cache Name'
expirationType:
type: string
description: 'Provide Expiration Type'
expirationTime:
type: string
description: 'Provide Expiration Time in Seconds'

workflow_call:
inputs:
cacheName:
type: string
description: 'Provide Cache Name'
expirationType:
type: string
description: 'Provide Expiration Type'
expirationTime:
type: string
description: 'Provide Expiration Time in Seconds'

jobs:
Create_Update-Cache:
runs-on: [ubuntu-latest]
steps:
- name: Do something
run: |
echo Iteration
echo ${{ inputs.cacheName }}
echo ${{ inputs.expirationType }}
echo ${{ inputs.expirationTime }}
55 changes: 55 additions & 0 deletions .github/workflows/workflow-tester98.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test 98 # Related to SO https://stackoverflow.com/questions/78513070/how-to-send-variables-to-called-workflow-from-the-caller-workflow/78514014?noredirect=1#comment138421206_78514014

on:
workflow_dispatch:

jobs:
build:
runs-on: [ubuntu-latest]
outputs:
iterations: ${{ steps.set-iterations.outputs.values }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read CSV and trigger workflows
id: set-iterations
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo Saving iteration list output as Array
# Join the array elements into a single JSON array
json_array='[{"cacheName":"iteration1","expirationType":"iteration1","expirationTime":"iteration1"}, {"cacheName":"iteration2","expirationType":"iteration2","expirationTime":"iteration2"}, {"cacheName":"iteration3","expirationType":"iteration3","expirationTime":"iteration3"}]'
echo "List: $json_array"
echo "values=$json_array" >> $GITHUB_OUTPUT
- name: Check list
run: |
echo ${{ steps.set-iterations.outputs.values }}
call-ASGW-Config-Cache:
needs: [build]
strategy:
matrix:
iteration: ${{fromJson(needs.build.outputs.iterations)}}
uses: ./.github/workflows/workflow-tester98-reusable.yml
secrets: inherit
permissions:
contents: read
with:
cacheName: ${{ matrix.iteration.cacheName }}
expirationType: ${{ matrix.iteration.expirationType }}
expirationTime: ${{ matrix.iteration.expirationTime }}

check:
needs: [build]
runs-on: [ubuntu-latest]
strategy:
matrix:
iteration: ${{fromJson(needs.build.outputs.iterations)}}
steps:
- name: Do something
run: |
echo Iteration
echo ${{ matrix.iteration }}
echo ${{ matrix.iteration.cacheName }}
echo ${{ matrix.iteration.expirationType }}
echo ${{ matrix.iteration.expirationType }}
2 changes: 1 addition & 1 deletion backup/checkout-workflow.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Tue May 21 01:15:59 UTC 2024
Wed May 22 01:16:41 UTC 2024
2 changes: 1 addition & 1 deletion backup/pull-request-workflow.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Mon May 20 06:25:07 UTC 2024
Tue May 21 06:25:45 UTC 2024
2 changes: 1 addition & 1 deletion windows_report_full_remote.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Wed May 22 06:22:19 CUT 2024
Thu May 23 06:23:32 CUT 2024

0 comments on commit bfb74a8

Please sign in to comment.