From 52ed33cb853bbca73fe40f4cbd3409a5eaacf519 Mon Sep 17 00:00:00 2001 From: Minoplhy Date: Thu, 30 Sep 2021 19:44:17 +0700 Subject: [PATCH] trying github actions re-run --- .github/workflows/tasks.yaml | 39 +++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tasks.yaml b/.github/workflows/tasks.yaml index 60e0bbf..b5a2df5 100644 --- a/.github/workflows/tasks.yaml +++ b/.github/workflows/tasks.yaml @@ -7,11 +7,29 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: filters-build uses: minoplhy/filters-build_actions@main env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + - name: Restore the previous run result + uses: actions/cache@v2 + with: + path: | + run_result + key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }} + restore-keys: | + ${{ github.run_id }}-${{ github.job }}- + - name: Get the previous run result + id: run_result + run: cat run_result 2>/dev/null || echo 'default' + + - uses: actions/checkout@v2 + if: steps.run_result.outputs.run_result != 'success' + + - if: steps.run_result.outputs.run_result != 'success' + run: echo "I'm alive!" && exit 0 + + - run: echo "::set-output name=run_result::success" > run_result - name: build uses: minoplhy/filters-maker@main env: @@ -29,3 +47,22 @@ jobs: BRANCH_VERSION: "main" sub_action_location: "sub-action.py" sub_action_Repo: "minoplhy/filters" + - name: Restore the previous run result + uses: actions/cache@v2 + with: + path: | + run_result + key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }} + restore-keys: | + ${{ github.run_id }}-${{ github.job }}- + - name: Get the previous run result + id: run_result2 + run: cat run_result 2>/dev/null || echo 'default' + + - uses: actions/checkout@v2 + if: steps.run_result.outputs.run_result2 != 'success' + + - if: steps.run_result.outputs.run_result2 != 'success' + run: echo "I'm alive!" && exit 0 + + - run: echo "::set-output name=run_result::success" > run_result