ci: merge removal of workflows with stale.yml and remove untagged docker images on release only
This commit is contained in:
20
.github/workflows/clean.yml
vendored
Normal file
20
.github/workflows/clean.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Clean untagged docker images from ghcr.io
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clean:
|
||||||
|
name: Clean untagged docker images from ghcr.io
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run script
|
||||||
|
run: ./delete_ghcr_dangling_images.sh lowlighter metrics
|
||||||
|
working-directory: .github/workflows/maintenance
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHCR_BOT_TOKEN }}
|
||||||
46
.github/workflows/maintenance.yml
vendored
46
.github/workflows/maintenance.yml
vendored
@@ -1,46 +0,0 @@
|
|||||||
name: Maintenance 🧰
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "30 2 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
workflow_removal:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Workflow cleanup 🧹👷♂️
|
|
||||||
# Errors will probably be caused by excesses in API quota, so we can safely continue.
|
|
||||||
# Remaining workflows will be removed in the next scheduled run.
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2.3.4
|
|
||||||
|
|
||||||
- name: Run deletion script 🗑
|
|
||||||
run: ./delete_workflows.sh lowlighter/metrics
|
|
||||||
working-directory: ./.github/workflows/maintenance
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
dangling_images_removal:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Cleanup dangling images from GHCR 🧹📦
|
|
||||||
# Errors will probably be caused by excesses in API quota, so we can safely continue.
|
|
||||||
# Remaining workflows will be removed in the next scheduled run.
|
|
||||||
continue-on-error: true
|
|
||||||
# Pay attention that the org name is not necessary here, as gh will automatically take the one from the logged in user.
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
container:
|
|
||||||
- 'metrics'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2.3.4
|
|
||||||
|
|
||||||
- name: Run deletion script 🗑
|
|
||||||
run: ./delete_ghcr_dangling_images.sh lowlighter ${{ matrix.container }}
|
|
||||||
working-directory: ./.github/workflows/maintenance
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GHCR_BOT_TOKEN }}
|
|
||||||
16
.github/workflows/stale.yml
vendored
16
.github/workflows/stale.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Stale issue and pull requests
|
name: Stale issues, pull requests and workflow runs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v3
|
- uses: actions/stale@v3
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ github.token }}
|
||||||
stale-pr-message: This pull request seems to be inactive and will be automatically closed in a few days if it remains without any activity.
|
stale-pr-message: This pull request seems to be inactive and will be automatically closed in a few days if it remains without any activity.
|
||||||
days-before-pr-stale: 21
|
days-before-pr-stale: 21
|
||||||
days-before-pr-close: 3
|
days-before-pr-close: 3
|
||||||
@@ -34,3 +34,15 @@ jobs:
|
|||||||
pr-lock-inactive-days: 14
|
pr-lock-inactive-days: 14
|
||||||
pr-lock-reason: ""
|
pr-lock-reason: ""
|
||||||
pr-lock-labels: ☑️ archived
|
pr-lock-labels: ☑️ archived
|
||||||
|
workflows:
|
||||||
|
name: Remove expired workflow runs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run script
|
||||||
|
run: ./delete_workflows.sh lowlighter/metrics
|
||||||
|
working-directory: .github/workflows/maintenance
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
Reference in New Issue
Block a user