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

Commit

Permalink
Align files
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 22, 2022
1 parent fde6dac commit 7206487
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 11 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.15.0
architect: giantswarm/architect@4.24.0

workflows:
test:
Expand Down
13 changes: 9 additions & 4 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@4.24.1
# devctl@5.9.0
#
name: Create Release
on:
Expand Down Expand Up @@ -120,11 +120,13 @@ jobs:
echo "error: no changes in \"$file\"" >&2
exit 1
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]"
- name: Commit changes
run: |
file="${{ needs.gather_facts.outputs.project_go_path }}"
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add $file
git commit -m "Bump version to ${{ steps.update_project_go.outputs.new_version }}"
- name: Push changes
Expand Down Expand Up @@ -167,10 +169,13 @@ jobs:
with:
version: ${{ needs.gather_facts.outputs.version }}
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]"
- name: Create tag
run: |
version="${{ needs.gather_facts.outputs.version }}"
git config --local user.name "github-actions"
git tag "v$version" ${{ github.sha }}
- name: Push tag
env:
Expand Down
69 changes: 65 additions & 4 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@4.24.1
# devctl@5.9.0
#
name: Create Release PR
on:
Expand Down Expand Up @@ -44,6 +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 }}
skip: ${{ steps.pr_exists.outputs.skip }}
version: ${{ steps.gather_facts.outputs.version }}
steps:
Expand Down Expand Up @@ -81,6 +82,7 @@ jobs:
version_major=$((version_major+1))
version_minor=0
version_patch=0
echo "::set-output name=is_major::true"
;;
*)
echo "Unknown Semver level provided"
Expand All @@ -90,6 +92,12 @@ jobs:
version="${version_major}.${version_minor}.${version_patch}"
else
version="${version#v}" # Strip "v" prefix.
version_major=$(echo "${version}" | cut -d "." -f 1)
version_minor=$(echo "${version}" | cut -d "." -f 2)
version_patch=$(echo "${version}" | cut -d "." -f 3)
if [[ $version_minor = 0 && $version_patch = 0 ]]; then
echo "::set-output name=is_major::true"
fi
fi
repo_name="$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')"
echo "repo_name=\"$repo_name\" base=\"$base\" head=\"$head\" version=\"$version\""
Expand Down Expand Up @@ -117,6 +125,9 @@ jobs:
env:
architect_flags: "--organisation ${{ github.repository_owner }} --project ${{ needs.gather_facts.outputs.repo_name }}"
steps:
- uses: actions/setup-go@v3
with:
go-version: '=1.18.1'
- name: Install architect
uses: giantswarm/install-binary-action@v1.0.0
with:
Expand All @@ -129,12 +140,62 @@ jobs:
- name: Prepare release changes
run: |
architect prepare-release ${{ env.architect_flags }} --version "${{ needs.gather_facts.outputs.version }}"
- name: Update version field in Chart.yaml
run: |
# Define chart_dir
repository="${{ needs.gather_facts.outputs.repo_name }}"
chart="helm/${repository}"
# Check chart directory.
if [ ! -d "${chart}" ]
then
echo "Could not find chart directory '${chart}', adding app suffix."
# Add app suffix.
chart="helm/${repository}-app"
# Check chart directory with app suffix.
if [ ! -d "${chart}" ]
then
echo "Could not find chart directory '${chart}', removing app suffix."
# Remove app suffix.
chart="helm/${repository%-app}"
if [ ! -d "${chart}" ]
then
# Print error.
echo "Could not find chart directory '${chart}', doing nothing."
fi
fi
fi
# Define chart YAML.
chart_yaml="${chart}/Chart.yaml"
# Check chart YAML.
if [ -f "${chart_yaml}" ]
then
# check if version in Chart.yaml is templated using architect
if [ $(grep -c "^version:.*\.Version.*$" "${chart_yaml}") = "0" ]; then
yq -i '.version = "${{ needs.gather_facts.outputs.version }}"' "${chart_yaml}"
fi
fi
- 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
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]"
- name: Create release commit
env:
version: "${{ needs.gather_facts.outputs.version }}"
run: |
git config --local user.email "action@github.com"
git config --local user.name "github-actions"
git add -A
git commit -m "Release v${{ env.version }}"
- name: Push changes
Expand All @@ -148,4 +209,4 @@ jobs:
base: "${{ needs.gather_facts.outputs.base }}"
version: "${{ needs.gather_facts.outputs.version }}"
run: |
hub pull-request -f -m "Release v${{ env.version }}" -a ${{ github.actor }} -b ${{ env.base }} -h ${{ needs.gather_facts.outputs.branch }}
hub pull-request -f -m "Release v${{ env.version }}" -a ${{ github.actor }} -b ${{ env.base }} -h ${{ needs.gather_facts.outputs.branch }}
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@4.24.1
# devctl@5.9.0
#
name: gitleaks

Expand Down
2 changes: 2 additions & 0 deletions .nancy-ignore.generated
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file is generated by https://github.com/giantswarm/github
# Repository specific ignores should be added to .nancy-ignore
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@4.24.1
# devctl@5.9.0
#

include Makefile.*.mk
Expand Down

0 comments on commit 7206487

Please sign in to comment.