Skip to content

Commit a76b926

Browse files
committed
Revert "Removing .github/workflows"
This reverts commit 367817a.
1 parent 367817a commit a76b926

File tree

5 files changed

+139
-0
lines changed

5 files changed

+139
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
11+
build-docker:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Build the Debian Docker image
18+
run: docker build . --file Dockerfile --tag backup-utils:${GITHUB_RUN_ID}
19+
- name: Build the Alpine Docker image
20+
run: docker build . --file Dockerfile.alpine --tag backup-utils-alpine:${GITHUB_RUN_ID}
21+
- name: Run tests in Debian Docker image
22+
run: docker run backup-utils:${GITHUB_RUN_ID} ghe-backup --version
23+
- name: Run tests in Alpine Docker image
24+
run: docker run backup-utils-alpine:${GITHUB_RUN_ID} ghe-backup --version
25+

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint Code Base
2+
3+
on:
4+
push:
5+
branches-ignore: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
lint:
11+
name: Lint Code Base
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v3
16+
with:
17+
# Full git history is needed to get a proper list of changed files within `super-linter`
18+
fetch-depth: 0
19+
- name: Lint Code Base
20+
uses: github/super-linter@v4
21+
env:
22+
VALIDATE_ALL_CODEBASE: false
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test and build
2+
3+
on: [pull_request]
4+
5+
6+
jobs:
7+
build:
8+
strategy:
9+
matrix:
10+
# macos-latest references are kept here for historical purposes. removed macos-latest from the
11+
#matrix as it is not a typical case for users and causes a lot of friction with other linux-based
12+
# installs. Recommend developing on codespaces or using an ubuntu container.
13+
os: ['ubuntu-22.04', 'ubuntu-20.04', 'ubuntu-18.04']
14+
fail-fast: false
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- name: Install Dependencies (Linux)
18+
run: |
19+
sudo apt-get update -y
20+
sudo apt-get install -y devscripts debhelper moreutils fakeroot jq pigz help2man
21+
wget "https://github.com/koalaman/shellcheck/releases/download/latest/shellcheck-latest.linux.x86_64.tar.xz"
22+
tar --xz -xvf "shellcheck-latest.linux.x86_64.tar.xz"
23+
sudo cp shellcheck-latest/shellcheck /usr/bin/shellcheck
24+
if: matrix.os != 'macos-latest'
25+
- name: Install Dependencies (macOS)
26+
run: |
27+
brew install gnu-tar shellcheck jq pigz coreutils gnu-sed gnu-getopt wget
28+
brew install moreutils gawk
29+
if: matrix.os == 'macos-latest'
30+
- name: Get Sources
31+
uses: actions/checkout@v3
32+
- name: Test
33+
run: |
34+
export PATH="$PATH:/snap/bin"
35+
make test
36+
shell: bash
37+
- name: Build (Linux)
38+
run: DEB_BUILD_OPTIONS=nocheck debuild -us -uc
39+
if: matrix.os != 'macos-latest'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
name: 'Close stale support escalation issues'
3+
on:
4+
push:
5+
branches:
6+
- master
7+
schedule:
8+
- cron: '30 1 * * *' # Run each day at 1:30 UTC
9+
10+
permissions:
11+
issues: write
12+
13+
jobs:
14+
stale:
15+
if: github.repository == 'github/ghes' || github.repository == 'github/enterprise2' || github.repository == 'github/backup-utils-private'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/stale@v7
19+
with:
20+
repo-token: ${{ secrets.GITHUB_TOKEN }}
21+
stale-issue-message: 'This support escalation issue is stale because it has been open 30 days with no activity. To make it never stale, add a label never-stale.'
22+
close-issue-message: 'This support escalation issue is closed because it has been open 45 days with no activity. To make it never stale, add a label never-stale.'
23+
days-before-stale: 30
24+
days-before-close: 45
25+
only-labels: 'support-escalation'
26+
stale-issue-label: 'stale'
27+
exempt-issue-labels: 'never-stale,P1,P2,P3'

.github/workflows/stale.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
name: Mark stale issues and pull requests
3+
4+
on:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
stale:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/stale@v7
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
stale-issue-message: "👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the `Keep` label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot."
18+
stale-issue-label: "Stale"
19+
exempt-issue-labels: "Keep"
20+
stale-pr-message: "👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the `Keep` label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot."
21+
stale-pr-label: "Stale"
22+
exempt-pr-labels: "Keep, epic, initiative, GHAE"
23+
days-before-stale: 30 # 1 month, which accounts for "now" and "next", but anything beyond is "never"
24+
days-before-close: 5
25+
ascending: true

0 commit comments

Comments
 (0)