Skip to content

Commit

Permalink
Add some .packit and .github configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvalena committed Nov 15, 2023
1 parent 856e7ac commit 219c145
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 85 deletions.
11 changes: 6 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ modules:
bash:
- modules.d/00bash/*

bootchart:
- modules.d/00bootchart/*

dash:
- modules.d/00dash/*

Expand Down Expand Up @@ -138,9 +141,6 @@ multipath:
nvdimm:
- modules.d/90nvdimm/*

overlayfs:
- modules.d/90overlayfs/*

ppcmac:
- modules.d/90ppcmac/*

Expand All @@ -150,6 +150,9 @@ qemu:
qemu-net:
- modules.d/90qemu-net/*

stratis:
- modules.d/90stratis/*

crypt-gpg:
- modules.d/91crypt-gpg/*

Expand Down Expand Up @@ -288,5 +291,3 @@ uefi-lib:
test:
- test/*
- test/**/*
- modules.d/80test*
- modules.d/80test*/*
11 changes: 3 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
This pull request changes...
<description/>

## Changes
(cherry picked from commit ... )

## Checklist
- [ ] I have tested it locally
- [ ] I have reviewed and updated any documentation if relevant
- [ ] I am providing new code and test(s) for it

Fixes #
Resolves: #
8 changes: 3 additions & 5 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Ignore if in a milestone
exemptMilestones: true
# Issues with these labels will never be considered stale
exemptLabels:
- documents
Expand All @@ -15,9 +13,9 @@ exemptLabels:
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue is being marked as stale because it has not had any recent activity.
It will be closed if no further activity occurs.
If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days.
This issue is being marked as stale because it has not had any recent activity.
It will be closed if no further activity occurs.
If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
28 changes: 11 additions & 17 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Container
on:
schedule:
- cron: '30 11 * * *' # every day at 11:30 UTC
- cron: '30 11 * * *' # every day at 4:40
push:
branches: [ master ]
branches: [ main ]
paths:
- 'test/container/**'
- '.github/workflows/container.yml'
pull_request:
branches: [ master ]
branches: [ main ]
paths:
- 'test/container/**'
- '.github/workflows/container.yml'
Expand All @@ -19,7 +19,6 @@ permissions:

jobs:
push_to_registry:
if: github.repository == 'dracutdevs/dracut' || vars.CONTAINER == 'enabled'
name: Build and push containers image to GitHub Packages
runs-on: ubuntu-latest
concurrency:
Expand All @@ -29,28 +28,23 @@ jobs:
fail-fast: false
matrix:
config:
- { dockerfile: 'Dockerfile-Fedora-latest', tag: 'fedora:latest' }
- { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' }
- { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' }
- { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
- { dockerfile: 'Dockerfile-Gentoo', tag: 'gentoo:latest' }
- { dockerfile: 'Dockerfile-Ubuntu', tag: 'ubuntu:latest' }
- { dockerfile: 'Dockerfile-CentOS-9-Stream', tag: 'centos:stream9' }
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v1
# with:
# buildkitd-flags: --debug
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up env
run: echo "repository_owner=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}
- name: Build and Push Container
uses: docker/build-push-action@v4
uses: docker/build-push-action@v2
with:
file: test/container/${{ matrix.config.dockerfile }}
tags: ghcr.io/${{env.repository_owner}}/${{ matrix.config.tag }}
tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.config.tag }}
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
19 changes: 19 additions & 0 deletions .github/workflows/differential-shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Differential ShellCheck
on:
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-20.04

steps:
- name: Repository checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Differential ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
90 changes: 59 additions & 31 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,50 @@ name: Integration Test

on:
pull_request:
branches: [ master ]

env:
DEBUGFAIL: "${{ secrets.ACTIONS_STEP_DEBUG && 'rd.debug' }}"
branches: [ main ]

jobs:
basic:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:latest",
]
test: [
"04",
]
fail-fast: false
container:
image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
test:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"arch:latest",
"debian:latest",
"fedora:latest",
"gentoo:latest",
"opensuse:latest",
"ubuntu:latest",
]
test: [
"01",
"02",
"03",
"04",
"10",
"11",
"12",
Expand All @@ -37,56 +54,67 @@ jobs:
"15",
"16",
"17",
"18",
"62",
"20",
"21",
"30",
"31",
"35",
"36",
"40",
"41",
"98",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
network:
centos-9-stream:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:latest",
]
network: [
"network-manager",
"network-legacy",
#"systemd-networkd",
#"connman",
"centos:stream9",
]
# Disabled tests (due to dropped packages in RHEL/CentOS):
# 03, 04, 15: requires btrfs
# 14: requires dmraid
# 30, 31, 35, 36: requires scsi-target-utils
test: [
"01",
"02",
"10",
"11",
"12",
"13",
"16",
"17",
"20",
"30",
"35",
"21",
"40",
"60",
# "50", # times out
"41",
"98",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: USE_NETWORK=${{ matrix.network }} ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
36 changes: 18 additions & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,16 @@ name: Lint

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
lint-shell:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: shfmt
uses: luizm/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -s # arguments to shfmt.
with:
sh_checker_shellcheck_disable: false
sh_checker_comment: true

lint-c:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2

- name: install tools
run: sudo apt-get install astyle
Expand All @@ -36,3 +21,18 @@ jobs:

- name: check formatting
run: git diff --exit-code

lint-shell:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: shfmt
uses: luizm/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -s # arguments to shfmt.
with:
sh_checker_shellcheck_disable: false
sh_checker_comment: true
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check-out the repo under $GITHUB_WORKSPACE
uses: actions/checkout@v3
uses: actions/checkout@v2

- name: Run Commisery
uses: dracutdevs/commisery-action@master
Expand Down
Loading

0 comments on commit 219c145

Please sign in to comment.