mirror of
https://github.com/saltstack-formulas/salt-formula.git
synced 2026-01-04 16:37:57 +01:00
chore(copier): update template https://github.com/dafyddj/copier-ssf-ci to v2.7.0
This commit is contained in:
parent
0f2b280a28
commit
3914b4f143
@ -1,5 +1,5 @@
|
||||
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
|
||||
_commit: v2.5.1
|
||||
_commit: v2.7.0
|
||||
_src_path: https://github.com/dafyddj/copier-ssf-ci
|
||||
failure_permitted_ignored: []
|
||||
failure_permitted_patterns: []
|
||||
|
||||
15
.github/workflows/main.yml
vendored
15
.github/workflows/main.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
name: Lint / `pre-commit`
|
||||
needs: should-run
|
||||
if: fromJSON(needs.should-run.outputs.should-run)
|
||||
container: techneg/ci-pre-commit:v2.4.31@sha256:041f7d716f4cde881e547881e6cc771d499ff424d0afb7ec678176ff0b940d0a
|
||||
container: techneg/ci-pre-commit:v2.4.32@sha256:fa9eef397583add95f4fccefa6ecbbf7a3845d6168f07393da7bc619696b246b
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
@ -58,10 +58,17 @@ jobs:
|
||||
results:
|
||||
name: Release / Collect results
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
checks: read
|
||||
container: techneg/ci-semantic-release:v1.1.0
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- run: | # Needed due to bug actions/checkout#2031
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
# yamllint disable-line rule:line-length
|
||||
- uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
|
||||
with:
|
||||
@ -69,4 +76,10 @@ jobs:
|
||||
Release / Collect results
|
||||
ignore_pattern: ^GitLab CI
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Run `semantic-release`
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
MAINTAINER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
semantic-release --dry-run
|
||||
- run: echo "::notice ::Workflow success!"
|
||||
|
||||
@ -15,15 +15,15 @@
|
||||
stage_test: &stage_test 'test'
|
||||
# `image`
|
||||
# yamllint disable rule:line-length
|
||||
image_commitlint: &image_commitlint 'techneg/ci-commitlint:v1.1.97@sha256:7eaa2170f49cf9a8f2acd11a9fc35d4ec93c514935c6b76f7df8a39f9d2afb45'
|
||||
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.66@sha256:5a915fcebd0c32f54b4effcf1aa58ce03f78fc8e8b95e706183ec57c24c9337c'
|
||||
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.66@sha256:5a915fcebd0c32f54b4effcf1aa58ce03f78fc8e8b95e706183ec57c24c9337c'
|
||||
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.31@sha256:041f7d716f4cde881e547881e6cc771d499ff424d0afb7ec678176ff0b940d0a'
|
||||
image_commitlint: &image_commitlint 'techneg/ci-commitlint:v1.1.98@sha256:f227ba6da3c684b5506fa338bdb82b17e7a7a3f75f56b2407632b43a7e7276a2'
|
||||
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.67@sha256:2887fb02ee694a97241777b043b1942b7e6803080e06dd18633f083eed463844'
|
||||
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.67@sha256:2887fb02ee694a97241777b043b1942b7e6803080e06dd18633f083eed463844'
|
||||
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.32@sha256:fa9eef397583add95f4fccefa6ecbbf7a3845d6168f07393da7bc619696b246b'
|
||||
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest@sha256:fe69f9642c7edde46bbd78326d2c42c6e13fc73694efb142e92e206725479328'
|
||||
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14@sha256:374f588420087517a3cc0235e11293bffd72d7a59da3d98d5e69f014ff2a7761'
|
||||
image_semantic-release: &image_semanticrelease 'techneg/ci-semantic-release:v1.1.0'
|
||||
# `services`
|
||||
services_docker_dind: &services_docker_dind
|
||||
- 'docker:28.3.2-dind@sha256:5415fccf3da3aed821efb2258cb7dcf52fb9bb0627b02d45338e887c352c4bce'
|
||||
- 'docker:28.3.2-dind@sha256:44383404ebf0c36243f5969f0dddd23c204ea3bb185e7473a4141f6ccfd07b53'
|
||||
# yamllint enable rule:line-length
|
||||
# `variables`
|
||||
# https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3
|
||||
@ -226,13 +226,10 @@ ubuntu-2004-3006-14: {extends: '.test_instance'}
|
||||
# `release` stage: `semantic-release`
|
||||
###############################################################################
|
||||
semantic-release:
|
||||
only: *only_branch_master_parent_repo
|
||||
stage: *stage_release
|
||||
image: *image_semanticrelease
|
||||
variables:
|
||||
MAINTAINER_TOKEN: '${GH_TOKEN}'
|
||||
script:
|
||||
# Update `AUTHORS.md`
|
||||
- '${HOME}/go/bin/maintainer contributor'
|
||||
# Run `semantic-release`
|
||||
- 'semantic-release'
|
||||
|
||||
@ -30,7 +30,7 @@ repos:
|
||||
- id: commitlint
|
||||
- id: commitlint-ci
|
||||
- repo: https://github.com/rubocop-hq/rubocop
|
||||
rev: v1.78.0
|
||||
rev: v1.79.0
|
||||
hooks:
|
||||
- id: rubocop
|
||||
name: Check Ruby files with rubocop
|
||||
@ -100,7 +100,7 @@ repos:
|
||||
)$
|
||||
additional_dependencies: [pygments==2.16.1]
|
||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||
rev: 41.42.2
|
||||
rev: 41.43.0
|
||||
hooks:
|
||||
- id: renovate-config-validator
|
||||
name: Check Renovate config with renovate-config-validator
|
||||
|
||||
@ -3,20 +3,24 @@
|
||||
###############################################################################
|
||||
# (A) Update `FORMULA` with `${nextRelease.version}`
|
||||
###############################################################################
|
||||
|
||||
sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
|
||||
|
||||
|
||||
###############################################################################
|
||||
# (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst`
|
||||
# (B) Update `AUTHORS.md`
|
||||
###############################################################################
|
||||
|
||||
# Install `m2r2`
|
||||
pip3 install m2r2
|
||||
maintainer contributor --ignore-contributors semantic-release-bot,renovate[bot]
|
||||
|
||||
###############################################################################
|
||||
# (C) Use `m2r` to convert automatically produced `.md` docs to `.rst`
|
||||
###############################################################################
|
||||
|
||||
# Copy and then convert the `.md` docs
|
||||
cp ./*.md docs/
|
||||
cd docs/ || exit
|
||||
m2r2 --overwrite ./*.md
|
||||
m2r --overwrite ./*.md
|
||||
|
||||
# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
|
||||
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
branch: 'master',
|
||||
// TODO: remove this when we no longer process releases on GitLab CI
|
||||
repositoryUrl: 'https://github.com/saltstack-formulas/salt-formula',
|
||||
plugins: [
|
||||
['@semantic-release/commit-analyzer', {
|
||||
@ -21,88 +21,6 @@ module.exports = {
|
||||
'@semantic-release/github'
|
||||
],
|
||||
generateNotes: {
|
||||
preset: 'angular',
|
||||
writerOpts: {
|
||||
// Required due to upstream bug preventing all types being displayed.
|
||||
// Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317
|
||||
// Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410
|
||||
transform: (commit, context) => {
|
||||
const issues = []
|
||||
|
||||
commit.notes.forEach(note => {
|
||||
note.title = 'BREAKING CHANGES'
|
||||
})
|
||||
|
||||
// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
|
||||
if (commit.type === 'feat') {
|
||||
commit.type = 'Features'
|
||||
} else if (commit.type === 'fix') {
|
||||
commit.type = 'Bug Fixes'
|
||||
} else if (commit.type === 'perf') {
|
||||
commit.type = 'Performance Improvements'
|
||||
} else if (commit.type === 'revert') {
|
||||
commit.type = 'Reverts'
|
||||
} else if (commit.type === 'docs') {
|
||||
commit.type = 'Documentation'
|
||||
} else if (commit.type === 'style') {
|
||||
commit.type = 'Styles'
|
||||
} else if (commit.type === 'refactor') {
|
||||
commit.type = 'Code Refactoring'
|
||||
} else if (commit.type === 'test') {
|
||||
commit.type = 'Tests'
|
||||
} else if (commit.type === 'build') {
|
||||
commit.type = 'Build System'
|
||||
// } else if (commit.type === `chore`) {
|
||||
// commit.type = `Maintenance`
|
||||
} else if (commit.type === 'ci') {
|
||||
commit.type = 'Continuous Integration'
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
if (commit.scope === '*') {
|
||||
commit.scope = ''
|
||||
}
|
||||
|
||||
if (typeof commit.hash === 'string') {
|
||||
commit.shortHash = commit.hash.substring(0, 7)
|
||||
}
|
||||
|
||||
if (typeof commit.subject === 'string') {
|
||||
let url = context.repository
|
||||
? `${context.host}/${context.owner}/${context.repository}`
|
||||
: context.repoUrl
|
||||
if (url) {
|
||||
url = `${url}/issues/`
|
||||
// Issue URLs.
|
||||
commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
|
||||
issues.push(issue)
|
||||
return `[#${issue}](${url}${issue})`
|
||||
})
|
||||
}
|
||||
if (context.host) {
|
||||
// User URLs.
|
||||
commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
|
||||
if (username.includes('/')) {
|
||||
return `@${username}`
|
||||
}
|
||||
|
||||
return `[@${username}](${context.host}/${username})`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// remove references that already appear in the subject
|
||||
commit.references = commit.references.filter(reference => {
|
||||
if (issues.indexOf(reference.issue) === -1) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
|
||||
return commit
|
||||
}
|
||||
}
|
||||
preset: 'angular'
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user