Skip to content

Commit

Permalink
update main
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Aug 27, 2024
2 parents ab20a69 + d56edf3 commit 0a1cd97
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 58 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@ updates:
reviewers:
- stebenz
- eliobischof

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
commit-message:
prefix: "chore"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
reviewers:
- stebenz
- eliobischof

68 changes: 55 additions & 13 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: Bump Version
on:
repository_dispatch:
types:
- zitadel-released
- zitadel-released
workflow_dispatch:
inputs:
tag:
description: 'ZITADEL Tag'
required: false

permissions:
contents: write
Expand All @@ -16,8 +21,46 @@ jobs:
contents: write
pull-requests: write
steps:
- name: Validate the manually given input tag, if any
if: ${{ (github.event_name == 'workflow_dispatch') && (github.event.inputs.tag != '') }}
id: check-input
run: |
INPUT=${{github.event.inputs.tag}}
if ! [[ ${INPUT} =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "supplied invalid version number: ${INPUT}!"
echo "must be of schema: vX.X.X"
exit 1
fi
- name: Get Latest ZITADEL Release Version
id: latest-tag
uses: oprypin/find-latest-tag@v1
with:
repository: zitadel/zitadel
releases-only: true
# ignore prereleases
regex: '^v([0-9]+)\.([0-9]+)\.([0-9]+)$'

- name: Decide on Target ZITADEL Version
id: target-zitadel-version
run: |
INPUT=${{ github.event.inputs.tag }}
LATEST=${{ steps.latest-tag.outputs.tag }}
TARGET_ZITADEL_VERSION=${INPUT:-${LATEST}}
echo "input tag: ${INPUT}"
echo "latest tag: ${LATEST}"
echo "going to target zitadel version: ${TARGET_ZITADEL_VERSION}"
echo "tag=${TARGET_ZITADEL_VERSION}" >> $GITHUB_OUTPUT
- name: Parse Target ZITADEL Version into Major, Minor, Patch
id: parsed-target-zitadel-version
uses: release-kit/semver@v2
with:
source: string
string: ${{ steps.target-zitadel-version.outputs.tag }}

- id: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -40,18 +83,19 @@ jobs:
echo "Chart Version: ${{ steps.current-chart-version.outputs.data }}"
echo "ZITADEL Version: ${{ steps.current-zitadel-version.outputs.data }}"
- name: Parse Last ZITADEL Version
- name: Parse Currently ZITADEL Version into Major, Minor, Patch
id: parsed-last-zitadel-version
uses: booxmedialtd/ws-action-parse-semver@v1
uses: release-kit/semver@v2
with:
input_string: ${{ steps.current-zitadel-version.outputs.data }}
source: 'string'
string: ${{ steps.current-zitadel-version.outputs.data }}

- name: Set Version Type
- name: Set Version Update Type
id: set-version-type
run: |
[ ${{ github.event.client_payload.semanticoutputs.new_release_patch_version }} -gt ${{ steps.parsed-last-zitadel-version.outputs.patch }} ] && echo '::set-output name=type::PATCH' || true
[ ${{ github.event.client_payload.semanticoutputs.new_release_minor_version }} -gt ${{ steps.parsed-last-zitadel-version.outputs.minor }} ] && echo '::set-output name=type::MINOR' || true
[ ${{ github.event.client_payload.semanticoutputs.new_release_major_version }} -gt ${{ steps.parsed-last-zitadel-version.outputs.major }} ] && echo '::set-output name=type::MAJOR' || true
[ ${{ steps.parsed-target-zitadel-version.outputs.patch }} -gt ${{ steps.parsed-last-zitadel-version.outputs.patch }} ] && echo 'type=PATCH' >> $GITHUB_OUTPUT || true
[ ${{ steps.parsed-target-zitadel-version.outputs.minor }} -gt ${{ steps.parsed-last-zitadel-version.outputs.minor }} ] && echo 'type=MINOR' >> $GITHUB_OUTPUT || true
[ ${{ steps.parsed-target-zitadel-version.outputs.major }} -gt ${{ steps.parsed-last-zitadel-version.outputs.major }} ] && echo 'type=MAJOR' >> $GITHUB_OUTPUT || true
- name: Bump Chart Version
uses: jessicalostinspace/[email protected]
Expand All @@ -65,8 +109,7 @@ jobs:
with:
valueFile: 'charts/zitadel/Chart.yaml'
propertyPath: 'appVersion'
value: ${{ github.event.client_payload.semanticoutputs.new_release_version }}
updateFile: true
value: ${{ steps.target-zitadel-version.outputs.tag }}
commitChange: false
createPR: false

Expand All @@ -76,7 +119,6 @@ jobs:
valueFile: 'charts/zitadel/Chart.yaml'
propertyPath: 'version'
value: ${{ steps.bumped-chart-version.outputs.bumped-semantic-version }}
updateFile: true
commitChange: false
createPR: false

Expand All @@ -85,7 +127,7 @@ jobs:

- name: Create Pull Request
id: pull-request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
title: Bump ZITADEL Version
branch: create-pull-request/bump
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: add issue
uses: actions/add-to-project@v0.5.0
uses: actions/add-to-project@v1.0.2
if: ${{ github.event_name == 'issues' }}
with:
# You can target a repository in a different organization
Expand All @@ -28,14 +28,14 @@ jobs:
username: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
- name: add pr
uses: actions/add-to-project@v0.5.0
uses: actions/add-to-project@v1.0.2
if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' && !contains(steps.checkUserMember.outputs.teams, 'engineers')}}
with:
# You can target a repository in a different organization
# to the issue
project-url: https://github.com/orgs/zitadel/projects/2
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
- uses: actions-ecosystem/[email protected].0
- uses: actions-ecosystem/[email protected].3
if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' && !contains(steps.checkUserMember.outputs.teams, 'staff')}}
with:
github_token: ${{ secrets.ADD_TO_PROJECT_PAT }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
steps:
- id: 'checkout'
name: Check The Repo Out
uses: 'actions/checkout@v3'
uses: 'actions/checkout@v4'
with:
fetch-depth: 0

- name: Get Changed Test Relevant Files
id: 'list-changed-test'
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v45
with:
files: |
charts/zitadel/templates/**
Expand All @@ -26,14 +26,14 @@ jobs:
- id: 'set-up-helm'
name: Install Helm (The Chart Testing CLI Depends On It)
uses: 'azure/setup-helm@v3.5'
uses: 'azure/setup-helm@v4'
with:
version: latest
if: steps.list-changed-test.outputs.any_changed == 'true'

- id: 'set-up-python'
name: Install Python (The Chart Testing CLI Depends On It)
uses: 'actions/setup-python@v3.1.4'
uses: 'actions/setup-python@v5.1.1'
with:
python-version: 3.11.4
if: steps.list-changed-test.outputs.any_changed == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- id: 'checkout'
uses: 'actions/checkout@v3'
uses: 'actions/checkout@v4'
with:
fetch-depth: "0"

Expand All @@ -29,7 +29,7 @@ jobs:
run: 'helm repo add cockroachdb https://charts.cockroachdb.com/'

- id: 'release'
uses: 'helm/chart-releaser-action@v1.5.0'
uses: 'helm/chart-releaser-action@v1.6.0'
env:
CR_GENERATE_RELEASE_NOTES: 'true'
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
steps:
- id: 'checkout'
name: Check The Repo Out
uses: 'actions/checkout@v3'
uses: 'actions/checkout@v4'
with:
fetch-depth: 0

- name: Get Changed Test Relevant Files
id: 'list-changed-test'
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v45
with:
files: |
charts/zitadel/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: "Checkout"
id: 'checkout'
uses: 'actions/checkout@v3'
uses: 'actions/checkout@v4'
with:
ref: 'gh-pages'

Expand All @@ -33,7 +33,7 @@ jobs:

- name: 'Create Pull Request'
id: 'pr'
uses: 'peter-evans/create-pull-request@v5'
uses: 'peter-evans/create-pull-request@v6'
with:
title: 'docs: update README.md'
branch: 'update-repo-readme'
Expand Down
21 changes: 12 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ require (
github.com/jinzhu/copier v0.4.0
github.com/stretchr/testify v1.9.0
github.com/zitadel/oidc v1.13.5
github.com/zitadel/zitadel-go/v2 v2.2.6
github.com/zitadel/zitadel-go/v2 v2.2.8
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.30.3
k8s.io/apimachinery v0.30.3
k8s.io/client-go v0.30.3
k8s.io/api v0.31.0
k8s.io/apimachinery v0.31.0
k8s.io/client-go v0.31.0
)

require (
Expand All @@ -20,9 +20,10 @@ require (
github.com/aws/aws-sdk-go v1.53.10 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
Expand All @@ -39,6 +40,7 @@ require (
github.com/gonvenience/wrap v1.2.0 // indirect
github.com/gonvenience/ytbx v1.4.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/schema v1.4.1 // indirect
Expand All @@ -61,19 +63,20 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/hashstructure v1.1.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/spdystream v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/pquerna/otp v1.4.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
github.com/urfave/cli/v2 v2.27.2 // indirect
github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
Expand All @@ -91,9 +94,9 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
Loading

0 comments on commit 0a1cd97

Please sign in to comment.