From b7d80ff574a75da8b322c1bf4cf79ea395dc7797 Mon Sep 17 00:00:00 2001 From: Prathmesh Prabhu <82062616+prprabhu-ms@users.noreply.github.com> Date: Sun, 11 Sep 2022 14:50:07 +0530 Subject: [PATCH] Update action.yml --- action.yml | 119 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 93 insertions(+), 26 deletions(-) diff --git a/action.yml b/action.yml index 94a583a..84bfa1d 100644 --- a/action.yml +++ b/action.yml @@ -1,28 +1,95 @@ -name: 'Upload a Build Artifact' -description: 'Upload a build artifact that can be used by subsequent workflow steps' -author: 'GitHub' -inputs: - name: - description: 'Artifact name' - default: 'artifact' - path: - description: 'A file, directory or wildcard pattern that describes what to upload' - required: true - if-no-files-found: - description: > - The desired behavior if no files are found using the provided path. +on: + workflow_dispatch: + push: + branches: + - main - Available Options: - warn: Output a warning but do not fail the action - error: Fail the action with an error message - ignore: Do not output any warnings or errors, the action does not fail - default: 'warn' - retention-days: - description: > - Duration after which artifact will expire in days. 0 means using default retention. +name: Synchronized jobs - Minimum 1 day. - Maximum 90 days unless changed from the repository settings page. -runs: - using: 'node16' - main: 'dist/index.js' +jobs: + first: + name: First + runs-on: ubuntu-latest + strategy: + matrix: + build: ['stable', 'beta'] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup git config + run: | + git config user.name boop + git config user.email beep@bop.baap + - name: Change my file + run: | + mkdir -p sync + rm -f sync/first-${{ matrix.build }} + echo ${{ github.run_id }} > sync/first-${{ matrix.build }} + - name: Create a patch file + run: | + git add sync/first-${{ matrix.build }} + git commit -m 'Modified sync/first-${{ matrix.build }}' + git format-patch -1 --output=first-${{ matrix.build }}.patch + - uses: actions/upload-artifact@v2 + with: + name: first-${{ matrix.build }}.patch + path: first-${{ matrix.build }}.patch + if-no-files-found: error + retention-days: 1 + + second: + name: Second + runs-on: ubuntu-latest + strategy: + matrix: + build: ['stable', 'beta'] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup git config + run: | + git config user.name boop + git config user.email beep@bop.baap + - name: Change my file + run: | + mkdir -p sync + rm -f sync/second-${{ matrix.build }} + echo ${{ github.run_id }} > sync/second-${{ matrix.build }} + - name: Create a patch file + run: | + git add sync/second-${{ matrix.build }} + git commit -m 'Modified sync/second-${{ matrix.build }}' + git format-patch -1 --output=second-${{ matrix.build }}.patch + - uses: actions/upload-artifact@v2 + with: + name: second-${{ matrix.build }}.patch + path: second-${{ matrix.build }}.patch + if-no-files-found: error + retention-days: 1 + + push: + name: Push + runs-on: ubuntu-latest + needs: [first, second] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup git config + run: | + git config user.name boop + git config user.email beep@bop.baap + - uses: actions/download-artifact@v3 + with: + name: first-beta.patch + - uses: actions/download-artifact@v3 + with: + name: first-stable.patch + - uses: actions/download-artifact@v3 + with: + name: second-beta.patch + - uses: actions/download-artifact@v3 + with: + name: second-stable.patch