Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Align files (#197)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <action@github.com>
  • Loading branch information
architectbot and actions-user committed Aug 21, 2023
1 parent 68e9ad4 commit 02cb997
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
architect: giantswarm/architect@4.28.1
architect: giantswarm/architect@4.31.0

workflows:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zz_generated.add-team-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
mkdir -p artifacts
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \
-O artifacts/users.yaml \
https://raw.githubusercontent.com/giantswarm/github/master/tools/issue-automation/user-mapping.yaml
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/user-mapping.yaml
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/zz_generated.add-to-project-board.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
mkdir -p artifacts
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \
-O artifacts/users.yaml \
https://raw.githubusercontent.com/giantswarm/github/master/tools/issue-automation/user-mapping.yaml
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/user-mapping.yaml
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -28,7 +28,7 @@ jobs:
mkdir -p artifacts
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \
-O artifacts/labels.yaml \
https://raw.githubusercontent.com/giantswarm/github/master/tools/issue-automation/label-mapping.yaml
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/label-mapping.yaml
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
33 changes: 21 additions & 12 deletions .github/workflows/zz_generated.check_values_schema.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@5.19.0
# devctl@6.6.0
#
name: 'Values and schema'
on:
Expand All @@ -13,6 +13,8 @@ on:
- 'helm/**/values.schema.json' # schema
- 'helm/**/ci/ci-values.yaml' # overrides for CI (can contain required entries)

push: {}

jobs:
check:
name: 'validate values.yaml against values.schema.json'
Expand All @@ -30,15 +32,22 @@ jobs:
- name: 'Check if values.yaml is a valid instance of values.schema.json'
run: |
HELM_DIR=$(git diff --name-only origin/${GITHUB_BASE_REF} ${GITHUB_SHA} \
| grep 'helm/[-a-z].*\/' | head -1 | awk -F '/' '{print $1"/"$2}')
VALUES=${HELM_DIR}/values.yaml
if [ -f ${HELM_DIR}/ci/ci-values.yaml ]; then
# merge ci-values.yaml into values.yaml (providing required values)
echo -e "\nMerged values:\n=============="
yq '. *= load("'${HELM_DIR}'/ci/ci-values.yaml")' ${HELM_DIR}/values.yaml | tee ${HELM_DIR}/combined-values.yaml
echo -e "\n==============\n"
VALUES=${HELM_DIR}/combined-values.yaml
fi
for chart_yaml in helm/*/Chart.yaml; do
helm_dir="${chart_yaml%/Chart.yaml}"
if [ ! -f ${helm_dir}/values.schema.json ]; then
echo "Skipping validation for '${helm_dir}' folder, because 'values.schema.json' does not exist..."
continue
fi
values=${helm_dir}/values.yaml
if [ -f ${helm_dir}/ci/ci-values.yaml ]; then
# merge ci-values.yaml into values.yaml (providing required values)
echo -e "\nMerged values:\n=============="
yq '. *= load("'${helm_dir}'/ci/ci-values.yaml")' ${helm_dir}/values.yaml | tee ${helm_dir}/combined-values.yaml
echo -e "\n==============\n"
values=${helm_dir}/combined-values.yaml
fi
${HOME}/yajsv -s ${HELM_DIR}/values.schema.json ${VALUES}
${HOME}/yajsv -s ${helm_dir}/values.schema.json ${values}
done
20 changes: 10 additions & 10 deletions .github/workflows/zz_generated.create_release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@5.19.0
# devctl@6.6.0
#
name: Create Release
on:
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
uses: giantswarm/install-binary-action@v1.1.0
with:
binary: "architect"
version: "6.10.0"
version: "6.11.0"
- name: Install semver
uses: giantswarm/install-binary-action@v1.1.0
with:
Expand Down Expand Up @@ -122,22 +122,22 @@ jobs:
fi
- name: Set up git identity
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "dev@giantswarm.io"
git config --local user.name "taylorbot"
- name: Commit changes
run: |
file="${{ needs.gather_facts.outputs.project_go_path }}"
git add $file
git commit -m "Bump version to ${{ steps.update_project_go.outputs.new_version }}"
- name: Push changes
env:
REMOTE_REPO: "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
REMOTE_REPO: "https://${{ github.actor }}:${{ secrets.TAYLORBOT_GITHUB_ACTION }}@github.com/${{ github.repository }}.git"
branch: "${{ github.ref }}-version-bump"
run: |
git push "${REMOTE_REPO}" HEAD:${{ env.branch }}
- name: Create PR
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
base: "${{ github.ref }}"
branch: "${{ github.ref }}-version-bump"
version: "${{ needs.gather_facts.outputs.version }}"
Expand Down Expand Up @@ -171,22 +171,22 @@ jobs:
path: ./CHANGELOG.md
- name: Set up git identity
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "dev@giantswarm.io"
git config --local user.name "taylorbot"
- name: Create tag
run: |
version="${{ needs.gather_facts.outputs.version }}"
git tag "v$version" ${{ github.sha }}
- name: Push tag
env:
REMOTE_REPO: "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
REMOTE_REPO: "https://${{ github.actor }}:${{ secrets.TAYLORBOT_GITHUB_ACTION }}@github.com/${{ github.repository }}.git"
run: |
git push "${REMOTE_REPO}" --tags
- name: Create release
id: create_gh_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
with:
body: ${{ steps.changelog_reader.outputs.changes }}
tag_name: "v${{ needs.gather_facts.outputs.version }}"
Expand Down
36 changes: 20 additions & 16 deletions .github/workflows/zz_generated.create_release_pr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@5.19.0
# devctl@6.6.0
#
name: Create Release PR
on:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
repo_name: ${{ steps.gather_facts.outputs.repo_name }}
branch: ${{ steps.gather_facts.outputs.branch }}
base: ${{ steps.gather_facts.outputs.base }}
is_major: ${{ steps.gather_facts.outputs.is_major }}
needs_major_bump: ${{ steps.gather_facts.outputs.needs_major_bump }}
skip: ${{ steps.pr_exists.outputs.skip }}
version: ${{ steps.gather_facts.outputs.version }}
steps:
Expand All @@ -65,7 +65,7 @@ jobs:
version="$(echo $head | awk -F# '{print $NF}')"
if [[ $version =~ ^major|minor|patch$ ]]; then
gh auth login --with-token <<<$(echo -n ${{ secrets.GITHUB_TOKEN }})
gh auth login --with-token <<<$(echo -n ${{ secrets.TAYLORBOT_GITHUB_ACTION }})
gh_api_get_latest_release_version()
{
if ! version="$(gh api "repos/$1/releases/latest" --jq '.tag_name[1:] | split(".") | .[0], .[1], .[2]')"
Expand Down Expand Up @@ -94,7 +94,9 @@ jobs:
version_major=$((version_major+1))
version_minor=0
version_patch=0
echo "is_major=true" >> $GITHUB_OUTPUT
if [[ "${version_major}" != "1" ]]; then
echo "needs_major_bump=true" >> $GITHUB_OUTPUT
fi
;;
*)
echo "Unknown Semver level provided"
Expand All @@ -109,8 +111,8 @@ jobs:
version_patch=$(echo "${version}" | cut -d "." -f 3)
# This will help us detect versions with suffixes as majors, i.e 3.0.0-alpha1.
# Even though it's a pre-release, it's still a major.
if [[ $version_minor = 0 && $version_patch =~ ^0.* ]]; then
echo "is_major=true" >> $GITHUB_OUTPUT
if [[ $version_minor = 0 && $version_patch =~ ^0.* && $version_major != 1 ]]; then
echo "needs_major_bump=true" >> $GITHUB_OUTPUT
fi
fi
repo_name="$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')"
Expand All @@ -122,10 +124,12 @@ jobs:
- name: Check if PR exists
id: pr_exists
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
run: |
if gh pr view --repo ${{ github.repository }} ${{ steps.gather_facts.outputs.branch }} | grep -i 'state:[[:space:]]*open' >/dev/null; then
gh pr view --repo ${{ github.repository }} ${{ steps.gather_facts.outputs.branch }}
head="${{ steps.gather_facts.outputs.branch }}"
branch="${head#refs/heads/}" # Strip "refs/heads/" prefix.
if gh pr view --repo "${{ github.repository }}" "${branch}" --json state --jq .state | grep -i 'open' > /dev/null; then
gh pr view --repo "${{ github.repository }}" "${branch}"
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
Expand All @@ -146,7 +150,7 @@ jobs:
uses: giantswarm/install-binary-action@v1.1.0
with:
binary: "architect"
version: "6.10.0"
version: "6.11.0"
- name: Checkout code
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -198,14 +202,14 @@ jobs:
- name: Bump go module defined in go.mod if needed
run: |
if [ "${{ needs.gather_facts.outputs.is_major }}" = true ] && test -f "go.mod"; then
go install github.com/marwan-at-work/mod/cmd/mod@v0.4.2
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
mod upgrade
fi
- name: Set up git identity
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "dev@giantswarm.io"
git config --local user.name "taylorbot"
- name: Create release commit
env:
version: "${{ needs.gather_facts.outputs.version }}"
Expand All @@ -214,12 +218,12 @@ jobs:
git commit -m "Release v${{ env.version }}"
- name: Push changes
env:
remote_repo: "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
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 }}
- name: Create PR
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
base: "${{ needs.gather_facts.outputs.base }}"
version: "${{ needs.gather_facts.outputs.version }}"
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zz_generated.gitleaks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@5.19.0
# devctl@6.6.0
#
name: gitleaks

Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# generated by giantswarm/github actions - changes will be overwritten
* @giantswarm/team-hydra
* @giantswarm/team-phoenix
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@5.19.0
# devctl@6.6.0
#

include Makefile.*.mk
Expand All @@ -20,4 +20,4 @@ include Makefile.*.mk

.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z%\\\/_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
2 changes: 1 addition & 1 deletion Makefile.gen.app.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@5.19.0
# devctl@6.6.0
#

##@ App
Expand Down
2 changes: 1 addition & 1 deletion Makefile.gen.go.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@5.19.0
# devctl@6.6.0
#

APPLICATION := $(shell go list -m | cut -d '/' -f 3)
Expand Down
14 changes: 11 additions & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": [
"config:base",
":reviewer(team:team-hydra)"
"config:base"
],
"labels": ["dependencies", "renovate"],
"packageRules": [
Expand Down Expand Up @@ -40,12 +39,21 @@
"dependencyDashboard": true,
"ignorePaths": [
".github/workflows/zz_generated.*",
".github/workflows/codeql-analysis.yml"
".github/workflows/codeql-analysis.yml",
".github/workflows/pre_commit_*.yaml"
],
"ignoreDeps": [
"architect",
"zricethezav/gitleaks-action",
"actions/setup-go"
],
"regexManagers": [
{
"fileMatch": ["^helm\\/.+\\/values\\.yaml$"],
"matchStrings": ["repo: (?<depName>.*)\n(\\s)*version: (?<currentValue>.*?)\n"],
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>.*)$"
}
],
"schedule": [ "after 6am on thursday" ]
}

0 comments on commit 02cb997

Please sign in to comment.