Skip to content

Commit 7938615

Browse files
authored
Merge pull request #36 from awede2/chore/copier-conversion
Chore/copier conversion
2 parents eac6750 + 956bcfa commit 7938615

15 files changed

Lines changed: 1038 additions & 782 deletions

.copier-answers.ssf-ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v2.10.7
3+
_src_path: https://github.com/dafyddj/copier-ssf-ci
4+
failure_permitted_ignored: []
5+
failure_permitted_patterns: []
6+
formula_name: sysctl
7+
release_using_gha: false
8+
renovate_extend_presets:
9+
- github>saltstack-formulas/.github
10+
- github>saltstack-formulas/.github:copier
11+
renovate_ignore_presets: []
12+
supported_oses:
13+
- AlmaLinux OS
14+
- Amazon Linux
15+
- CentOS
16+
- Debian
17+
- Fedora Linux
18+
- openSUSE
19+
- Oracle Linux
20+
- Rocky Linux
21+
- Ubuntu
22+
test_using_gha: false
23+
using_probot_settings: false

.github/renovate.json5

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: [
4+
"github>saltstack-formulas/.github",
5+
"github>saltstack-formulas/.github:copier"
6+
],
7+
/**********************************************************
8+
* This file is managed as part of a Copier template. *
9+
* Please make your own changes below this comment. *
10+
*********************************************************/
11+
}

.github/workflows/main.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: Test & release
3+
4+
'on':
5+
- pull_request
6+
- push
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}',
11+
github.event.repository.default_branch) }}
12+
13+
jobs:
14+
should-run:
15+
name: Prep / Should run
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 5
18+
outputs:
19+
should-run: ${{ steps.action.outputs.should-run }}
20+
steps:
21+
- id: action
22+
# yamllint disable-line rule:line-length
23+
uses: techneg-it/should-workflow-run@eff19348eb884f57e05bc6f05ae48ece3af14714 # v1.0.1
24+
pre-commit:
25+
name: Lint / `pre-commit`
26+
needs: should-run
27+
if: fromJSON(needs.should-run.outputs.should-run)
28+
container: techneg/ci-pre-commit:v2.5.40@sha256:08cbbc8b1b3ad6bfc7056494823b0f96faa50ab467649f8d48e8e6d963f11b41
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 10
31+
steps:
32+
- run: | # Needed because of bug #2031 in `actions/checkout`
33+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
34+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
with:
36+
fetch-depth: 0
37+
fetch-tags: true
38+
filter: tree:0
39+
- name: Export `CI_CACHE_ID` from container
40+
run: echo "CI_CACHE_ID=$(cat /.ci_cache_id)" >> $GITHUB_ENV
41+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
42+
with:
43+
path: ~/.cache/pre-commit
44+
key: "${{ env.CI_CACHE_ID }}|\
45+
${{ hashFiles('.pre-commit-config.yaml') }}"
46+
restore-keys: |
47+
${{ env.CI_CACHE_ID }}|
48+
- name: Build cache
49+
run: |
50+
pre-commit gc
51+
echo "Installing hook environments..."
52+
time -f "Hook installation took %E" pre-commit install-hooks
53+
- name: Run `pre-commit`
54+
run: |
55+
pre-commit run --all-files --color always --verbose
56+
pre-commit run --color always --hook-stage manual --verbose commitlint-ci
57+
results:
58+
name: Release / Collect results
59+
permissions:
60+
contents: write
61+
issues: write
62+
pull-requests: write
63+
checks: read
64+
container: techneg/ci-semantic-release:v1.2.38@sha256:292fab25c01c3a8bf6f27be8d397be40c4e95ded49d99d9a5ac47c79cc40d981
65+
runs-on: ubuntu-latest
66+
timeout-minutes: 15
67+
steps:
68+
- run: | # Needed due to bug actions/checkout#2031
69+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
70+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
71+
# yamllint disable-line rule:line-length
72+
- uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
73+
with:
74+
ignore: >
75+
Release / Collect results
76+
ignore_pattern: ^GitLab CI
77+
token: ${{ secrets.GITHUB_TOKEN }}
78+
- name: Run `semantic-release`
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
MAINTAINER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
run: |
83+
semantic-release --dry-run
84+
- run: echo "::notice ::Workflow success!"

0 commit comments

Comments
 (0)