From e4a2db7798ffa0c0c83d562ed6fc363b7d4675a0 Mon Sep 17 00:00:00 2001 From: Sean Date: Fri, 12 Apr 2024 22:05:52 +0800 Subject: [PATCH] Create run_with_option.sh --- .github/workflows/run_with_option.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/run_with_option.sh diff --git a/.github/workflows/run_with_option.sh b/.github/workflows/run_with_option.sh new file mode 100644 index 0000000..46b3f66 --- /dev/null +++ b/.github/workflows/run_with_option.sh @@ -0,0 +1,28 @@ +name: Option-based Workflow + +on: + push: + branches: + - main + +jobs: + option_based_workflow: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run with option + run: | + # 使用 $INPUT_OPTION 获取传递的选项参数 + ./run_with_option.sh $INPUT_OPTION + env: + INPUT_OPTION: ${{ matrix.option }} + + strategy: + matrix: + option: + - option1 + - option2 + - option3