upload-artifact/action.yml

96 lines
2.6 KiB
YAML
Raw Normal View History

2022-09-11 14:50:07 +05:30
on:
workflow_dispatch:
push:
branches:
- main
2022-09-11 14:50:07 +05:30
name: Synchronized jobs
2022-09-11 14:50:07 +05:30
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