Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
[WIP] Fix cleanup cache 2 (#192)
Browse files Browse the repository at this point in the history
* Revert "[WIP] Fix cleanup cache (#190)"

This reverts commit f2d29ce.

* move Cleanup stage to merged.yml
  • Loading branch information
General-Beck authored Jul 16, 2020
1 parent f2d29ce commit e6299cc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/merged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Merged
on:
pull_request:
types: [closed]

jobs:
build:
runs-on: self-hosted
container:
image: paritytech/ci-linux:production
volumes:
- /cache:/cache
if: github.event.pull_request.merged
steps:
## Cleanup stage
- name: Cleanup after merge pull request
if: github.event.pull_request.merged == true || github.event.pull_request.state == 'closed'
run: rm -rf $CARGO_TARGET_DIR
shell: bash
16 changes: 0 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,3 @@ jobs:
with:
name: ${{ matrix.toolchain }}.zip
path: artifacts/
## Cleanup stage
- name: Cleanup after merge pull request
if: always()
run: |
#debug
if ${{ github.event_name == 'pull_request' }} && ${{ github.event.action == 'closed' }} && ${{ github.event.pull_request.merged == true }}; then
echo "merged, cleaning";
rm -rf $CARGO_TARGET_DIR;
else
echo "nothing to do"
fi;
echo "github.event_name == " ${{ github.event_name }};
echo "github.event.action == " ${{ github.event.action }};
echo "github.event.pull_request.merged == " ${{ github.event.pull_request.merged }};
echo "github.ref == " ${{ github.ref }};
shell: bash

0 comments on commit e6299cc

Please sign in to comment.