forked from artemlive/vault_exporter
-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
49767b4
commit 1218938
Showing
13 changed files
with
189 additions
and
51 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# [email protected] | ||
# devctl | ||
# | ||
# https://github.com/giantswarm/devctl/blob/8960b8810d2fdb97543d84baa8b50ffa40da26a9/pkg/gen/input/workflows/internal/file/check_values_schema.yaml.template | ||
# | ||
name: 'Values and schema' | ||
on: | ||
|
@@ -21,7 +23,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# [email protected] | ||
# devctl | ||
# | ||
# https://github.com/giantswarm/devctl/blob/8960b8810d2fdb97543d84baa8b50ffa40da26a9/pkg/gen/input/workflows/internal/file/create_release.yaml.template | ||
# | ||
name: Create Release | ||
on: | ||
|
@@ -32,11 +34,10 @@ jobs: | |
steps: | ||
- name: Get version | ||
id: get_version | ||
env: | ||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | ||
run: | | ||
title="$(cat <<- 'COMMIT_MESSAGE_END' | head -n 1 - | ||
${{ github.event.head_commit.message }} | ||
COMMIT_MESSAGE_END | ||
)" | ||
title=$(echo -n "${COMMIT_MESSAGE}" | head -1) | ||
# Matches strings like: | ||
# | ||
# - "Release v1.2.3" | ||
|
@@ -53,7 +54,7 @@ jobs: | |
echo "version=${version}" >> $GITHUB_OUTPUT | ||
- name: Checkout code | ||
if: ${{ steps.get_version.outputs.version != '' }} | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Get project.go path | ||
id: get_project_go_path | ||
if: ${{ steps.get_version.outputs.version != '' }} | ||
|
@@ -66,11 +67,10 @@ jobs: | |
echo "path=${path}" >> $GITHUB_OUTPUT | ||
- name: Check if reference version | ||
id: ref_version | ||
env: | ||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | ||
run: | | ||
title="$(cat <<- 'COMMIT_MESSAGE_END' | head -n 1 - | ||
${{ github.event.head_commit.message }} | ||
COMMIT_MESSAGE_END | ||
)" | ||
title=$(echo -n "${COMMIT_MESSAGE}" | head -1) | ||
if echo "${title}" | grep -qE '^release v[0-9]+\.[0-9]+\.[0-9]+([.-][^ .-][^ ]*)?( \(#[0-9]+\))?$' ; then | ||
version=$(echo "${title}" | cut -d ' ' -f 2) | ||
fi | ||
|
@@ -90,20 +90,20 @@ jobs: | |
- gather_facts | ||
steps: | ||
- name: Install architect | ||
uses: giantswarm/install-binary-action@v1.1.0 | ||
uses: giantswarm/install-binary-action@c37eb401e5092993fc76d545030b1d1769e61237 # v3.0.0 | ||
with: | ||
binary: "architect" | ||
version: "6.13.0" | ||
version: "6.14.1" | ||
- name: Install semver | ||
uses: giantswarm/install-binary-action@v1.1.0 | ||
uses: giantswarm/install-binary-action@c37eb401e5092993fc76d545030b1d1769e61237 # v3.0.0 | ||
with: | ||
binary: "semver" | ||
version: "3.2.0" | ||
download_url: "https://github.com/fsaintjacques/${binary}-tool/archive/${version}.tar.gz" | ||
tarball_binary_path: "*/src/${binary}" | ||
smoke_test: "${binary} --version" | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Update project.go | ||
id: update_project_go | ||
env: | ||
|
@@ -144,6 +144,15 @@ jobs: | |
title: "Bump version to ${{ steps.update_project_go.outputs.new_version }}" | ||
run: | | ||
gh pr create --title "${{ env.title }}" --body "" --base ${{ env.base }} --head ${{ env.branch }} --reviewer ${{ github.actor }} | ||
- name: Enable auto-merge for PR | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}" | ||
base: "${{ github.ref }}" | ||
branch: "${{ github.ref }}-version-bump" | ||
version: "${{ needs.gather_facts.outputs.version }}" | ||
title: "Bump version to ${{ steps.update_project_go.outputs.new_version }}" | ||
run: | | ||
gh pr merge --auto --squash "${{ env.branch }}" || echo "::warning::Auto-merge not allowed. Please adjust the repository settings." | ||
create_release: | ||
name: Create release | ||
runs-on: ubuntu-22.04 | ||
|
@@ -154,7 +163,7 @@ jobs: | |
upload_url: ${{ steps.create_gh_release.outputs.upload_url }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Ensure correct version in project.go | ||
|
@@ -165,7 +174,7 @@ jobs: | |
grep -qE "version[[:space:]]*=[[:space:]]*\"$version\"" $file | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2 | ||
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3 | ||
with: | ||
version: ${{ needs.gather_facts.outputs.version }} | ||
path: ./CHANGELOG.md | ||
|
@@ -184,13 +193,12 @@ jobs: | |
git push "${REMOTE_REPO}" --tags | ||
- name: Create release | ||
id: create_gh_release | ||
uses: actions/create-release@v1 | ||
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}" | ||
with: | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
tag_name: "v${{ needs.gather_facts.outputs.version }}" | ||
release_name: "v${{ needs.gather_facts.outputs.version }}" | ||
tag: "v${{ needs.gather_facts.outputs.version }}" | ||
|
||
create-release-branch: | ||
name: Create release branch | ||
|
@@ -200,15 +208,15 @@ jobs: | |
if: ${{ needs.gather_facts.outputs.version }} | ||
steps: | ||
- name: Install semver | ||
uses: giantswarm/install-binary-action@v1.1.0 | ||
uses: giantswarm/install-binary-action@c37eb401e5092993fc76d545030b1d1769e61237 # v3.0.0 | ||
with: | ||
binary: "semver" | ||
version: "3.0.0" | ||
download_url: "https://github.com/fsaintjacques/${binary}-tool/archive/${version}.tar.gz" | ||
tarball_binary_path: "*/src/${binary}" | ||
smoke_test: "${binary} --version" | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 # Clone the whole history, not just the most recent commit. | ||
- name: Fetch all tags and branches | ||
|
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# [email protected] | ||
# devctl | ||
# | ||
# https://github.com/giantswarm/devctl/blob/43bd088e6bf64525a8e566fc1b0f4761a293afc4/pkg/gen/input/workflows/internal/file/create_release_pr.yaml.template | ||
# | ||
name: Create Release PR | ||
on: | ||
|
@@ -134,25 +136,63 @@ jobs: | |
else | ||
echo "skip=false" >> $GITHUB_OUTPUT | ||
fi | ||
prepare_release_pr: | ||
name: Prepare release PR for Backstage project | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- gather_facts | ||
if: ${{ needs.gather_facts.outputs.skip != 'true' && github.repository == 'giantswarm/backstage' }} | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: ${{ needs.gather_facts.outputs.branch }} | ||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
with: | ||
node-version: '20' | ||
- uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0 | ||
with: | ||
cmd: install | ||
- name: Prepare release PR | ||
uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0 | ||
with: | ||
cmd: release | ||
env: | ||
RELEASE_VERSION: ${{ needs.gather_facts.outputs.version }} | ||
- name: Set up git identity | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "taylorbot" | ||
- name: Create commit | ||
env: | ||
version: "${{ needs.gather_facts.outputs.version }}" | ||
run: | | ||
git add -A | ||
git commit -m "Prepare release v${{ env.version }}" | ||
- name: Push changes | ||
env: | ||
remote_repo: "https://${{ github.actor }}:${{ secrets.TAYLORBOT_GITHUB_ACTION }}@github.com/${{ github.repository }}.git" | ||
run: | | ||
git push "${remote_repo}" HEAD:${{ needs.gather_facts.outputs.branch }} | ||
create_release_pr: | ||
name: Create release PR | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- gather_facts | ||
if: ${{ needs.gather_facts.outputs.skip != 'true' }} | ||
- prepare_release_pr | ||
if: ${{ always() && needs.gather_facts.outputs.skip != 'true' }} | ||
env: | ||
architect_flags: "--organisation ${{ github.repository_owner }} --project ${{ needs.gather_facts.outputs.repo_name }}" | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version: '=1.18.1' | ||
go-version: '=1.23' | ||
- name: Install architect | ||
uses: giantswarm/install-binary-action@v1.1.0 | ||
uses: giantswarm/install-binary-action@c37eb401e5092993fc76d545030b1d1769e61237 # v3.0.0 | ||
with: | ||
binary: "architect" | ||
version: "6.11.0" | ||
version: "6.17.0" | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: ${{ needs.gather_facts.outputs.branch }} | ||
- name: Prepare release changes | ||
|
@@ -203,7 +243,7 @@ jobs: | |
- name: Bump go module defined in go.mod if needed | ||
run: | | ||
if [ "${{ needs.gather_facts.outputs.needs_major_bump }}" = true ] && test -f "go.mod"; then | ||
go install github.com/marwan-at-work/mod/cmd/mod@v0.5.0 | ||
go install github.com/marwan-at-work/mod/cmd/mod@v0.7.1 | ||
mod upgrade | ||
fi | ||
- name: Set up git identity | ||
|
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# [email protected] | ||
# devctl | ||
# | ||
# https://github.com/giantswarm/devctl/blob/8960b8810d2fdb97543d84baa8b50ffa40da26a9/pkg/gen/input/workflows/internal/file/gitleaks.yaml.template | ||
# | ||
name: gitleaks | ||
|
||
|
@@ -10,7 +12,7 @@ jobs: | |
gitleaks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: '0' | ||
- name: gitleaks-action | ||
|
Oops, something went wrong.