Skip to content

Commit

Permalink
ci: Address outdated issues and PRs (#114)
Browse files Browse the repository at this point in the history
Signed-off-by: Mriyam Tamuli <[email protected]>
  • Loading branch information
mbtamuli authored Jan 15, 2024
1 parent 028df59 commit 63ba8b7
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/images-build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create and publish the container image.
name: Create and publish the container image

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/images-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
packages: write

env:
BASE_REPOSITORY: warmmetal/csi-driver-image
BASE_REPOSITORY: warm-metal/csi-driver-image

jobs:
clean-ghcr:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Close stale issues and PRs

on:
push:
paths:
- .github/workflows/stale.yml
branches-ignore:
- dependabot/**
- releases/**
schedule:
# Once every day at midnight UTC. Source: https://crontab.guru/every-day
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
# Setting this variable to 'true' will cause the
# action to run in a dry-run mode
debug-only: ${{ vars.DEBUG_ONLY == 'true' }}
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days if no further activity occurs.
close-issue-message: >
Closing this issue after a prolonged period of inactivity. If this
issue is still present in the latest release, please feel free to
create a new issue with up-to-date information.
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days if no further activity occurs.
close-pr-message: >
Closing this PR after a prolonged period of inactivity. Please create a new PR
if the changes of the PR are still relevant.
exempt-issue-labels: 'awaiting-approval,work-in-progress,help-wanted'
exempt-pr-labels: 'awaiting-approval,work-in-progress,help-wanted'
days-before-stale: 30
days-before-close: 7
28 changes: 28 additions & 0 deletions docs/automation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Automation

There are a few [GitHub Workflows](https://docs.github.com/en/actions/using-workflows/about-workflows#about-workflows) that run on this repository.

## Build
- [![Create and publish the container image.](https://github.com/warm-metal/csi-driver-image/actions/workflows/images-build-and-push.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/images-build-and-push.yaml)
- On the main repository - `warm-metal/csi-driver-image`, builds and pushes the container image to Docker Hub [`warmmetal/csi-image`](https://hub.docker.com/r/warmmetal/csi-image)
- On any forks, builds and pushes the container image to `ghcr.io/<repository-name>`

## Tests

- [![backward-compatibility-5mins](https://github.com/warm-metal/csi-driver-image/actions/workflows/backward-compatibility.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/backward-compatibility.yaml)
- [![containerd-11mins](https://github.com/warm-metal/csi-driver-image/actions/workflows/containerd.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/containerd.yaml)
- [![cri-o-10mins](https://github.com/warm-metal/csi-driver-image/actions/workflows/cri-o.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/cri-o.yaml)
- [![restart-ds-containerd-5mins](https://github.com/warm-metal/csi-driver-image/actions/workflows/restart-ds-containerd.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/restart-ds-containerd.yaml)
- [![restart-ds-crio-8mins](https://github.com/warm-metal/csi-driver-image/actions/workflows/restart-ds-crio.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/restart-ds-crio.yaml)
- [![test-metrics-5m](https://github.com/warm-metal/csi-driver-image/actions/workflows/metrics.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/metrics.yaml)

## Maintenance

- [![Delete old container images](https://github.com/warm-metal/csi-driver-image/actions/workflows/images-cleanup.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/images-cleanup.yaml)
- Deletes all `ghcr.io/<repository-name>` image tags, expect `latest` or any semver tags. This workflow will run on forks only.
- [![Close stale issues and PRs](https://github.com/warm-metal/csi-driver-image/actions/workflows/stale.yaml/badge.svg)](https://github.com/warm-metal/csi-driver-image/actions/workflows/stale.yaml)
- [Create a repository variable](https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository) `DEBUG_ONLY` with value `true` to run the action in dry-run mode.
- Marks issues or PRs as stale after 30 days and closes them after 7 days, except those labeled with any of of the following
- `awaiting-approval`
- `work-in-progress`
- `help-wanted`

0 comments on commit 63ba8b7

Please sign in to comment.