-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @0xbe7a @pavelzw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
registries: | ||
github: | ||
type: git | ||
url: https://github.com | ||
username: x-access-token | ||
password: ${{ secrets.DEPENDABOT_CONTENT_PAT }} | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
reviewers: | ||
- quantco/ci | ||
registries: | ||
- github | ||
groups: | ||
dependencies: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: github-actions | ||
directory: /template/.github/workflows | ||
schedule: | ||
interval: daily | ||
reviewers: | ||
- quantco/ci | ||
registries: | ||
- github | ||
groups: | ||
dependencies: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
version="${TAG_NAME}" | ||
major="${version%%.*}" # see https://linuxjournal.com/article/8919 for an explanation of this bash magic | ||
|
||
git tag -d "${major}" | ||
local_delete=$? | ||
if [ $local_delete -eq 0 ]; then | ||
echo "Deleted local tag ${major}." | ||
echo "Deleted local tag \`${major}\`." >> "$GITHUB_STEP_SUMMARY" | ||
else | ||
echo "No local tag ${major} to delete." | ||
echo "No local tag \`${major}\` to delete." >> "$GITHUB_STEP_SUMMARY" | ||
fi | ||
git tag "${major}" | ||
|
||
git push -d origin "${major}" | ||
remote_delete=$? | ||
if [ $remote_delete -eq 0 ]; then | ||
echo "Deleted remote tag ${major}." | ||
echo "Deleted remote tag \`${major}\`." >> "$GITHUB_STEP_SUMMARY" | ||
else | ||
echo "No remote tag ${major} to delete." | ||
echo "No remote tag \`${major}\` to delete." >> "$GITHUB_STEP_SUMMARY" | ||
fi | ||
git push origin "${major}" | ||
push_worked=$? | ||
if [ $push_worked -ne 0 ]; then | ||
echo "Failed to push ${major} tag to remote." | ||
echo "Failed to push \`${major}\` tag to remote." >> "$GITHUB_STEP_SUMMARY" | ||
exit 1 | ||
fi | ||
|
||
if [ $remote_delete -eq 0 ]; then | ||
echo "Result: moved ${major} -> ${version} tag on remote." | ||
echo "Result: moved \`${major}\` -> \`${version}\` tag on remote." >> "$GITHUB_STEP_SUMMARY" | ||
else | ||
echo "Result: created ${major} -> ${version} tag on remote." | ||
echo "Result: created \`${major}\` -> \`${version}\` tag on remote." >> "$GITHUB_STEP_SUMMARY" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Bump versions | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 6 * * MON" | ||
|
||
jobs: | ||
bump: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { tool: mamba-org/setup-micromamba } | ||
- { tool: actions/cache } | ||
name: Bump ${{ matrix.tool }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Bump versions | ||
id: bump | ||
run: | | ||
set -euo pipefail | ||
new_version="$(gh repo view --json latestRelease ${{ matrix.tool }} | jq -r '.latestRelease.tagName')" | ||
echo "new-version=$new_version" >> "$GITHUB_OUTPUT" | ||
commit_sha="$(gh api "repos/${{ matrix.tool }}/commits/$new_version" | jq -r '.sha')" | ||
current_sha="$(grep "${{ matrix.tool }}@" action.yml | awk -F@ '{print $2}')" | ||
if [[ "$commit_sha" != "$current_sha" ]]; then | ||
sed -i "s/${{ matrix.tool }}@${current_sha}/${{ matrix.tool }}@${commit_sha}/g" action.yml | ||
else | ||
echo "${{ matrix.tool }} is already at the latest version: $current_sha" | ||
fi | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 | ||
with: | ||
title: Bump ${{ matrix.tool }} to ${{ steps.bump.outputs.new-version }} | ||
delete-branch: true | ||
commit-message: Bump ${{ matrix.tool }} version to ${{ steps.bump.outputs.new-version }} | ||
branch: bump-${{ matrix.tool }}-${{ steps.bump.outputs.new-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
# only release von 'vx.y.z' tags, not on the 'vx' tag itself | ||
- 'v*.*.*' | ||
permissions: | ||
contents: write | ||
|
||
# To release a new version, create a release called `v*.*.*` from the GitHub UI. | ||
# This will create a draft release with the changelog and push a 'vx' tag that points to the new release. | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: .github/scripts/release.sh | ||
env: | ||
TAG_NAME: ${{ github.ref_name }} |