Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
wgh136 committed Sep 5, 2024
1 parent 5af9ce0 commit 0da917b
Showing 2 changed files with 35 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/delete_old_workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Delete Old Workflows

on:
workflow_dispatch:

jobs:

delete-old-workflows:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Delete old workflows
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
min_created_at=$(date -d '7 days ago' +%Y-%m-%dT%H:%M:%SZ)
workflows=$(gh workflow list --json name,path,createdAt --jq 'map({name: .name, path: .path, createdAt: .createdAt})')
for workflow in $workflows; do
created_at=$(echo $workflow | jq -r '.createdAt')
if [ "$created_at" < "$min_created_at" ]; then
echo "Deleting workflow: $(echo $workflow | jq -r '.name') ($(echo $workflow | jq -r '.path'))"
gh workflow delete "$(echo $workflow | jq -r '.path')" --yes
else
echo "Keeping workflow: $(echo $workflow | jq -r '.name') ($(echo $workflow | jq -r '.path'))"
fi
done
8 changes: 4 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -18,10 +18,10 @@ jobs:
- run: python3 debian/build.py
- run: dart run flutter_to_arch
- run: |
rm -rf build/linux/arch/app.tar.gz
rm -rf build/linux/arch/pkg
rm -rf build/linux/arch/src
rm -rf build/linux/arch/PKGBUILD
sudo rm -rf build/linux/arch/app.tar.gz
sudo rm -rf build/linux/arch/pkg
sudo rm -rf build/linux/arch/src
sudo rm -rf build/linux/arch/PKGBUILD
- uses: actions/upload-artifact@v4
with:
name: deb_build

0 comments on commit 0da917b

Please sign in to comment.