Skip to content

Update ZITADEL

Update ZITADEL #1144

name: Update ZITADEL
on:
schedule:
- cron: '0 6 */1 * *'
workflow_dispatch:
inputs:
tag:
description: 'ZITADEL Tag'
required: false
jobs:
update:
runs-on: ubuntu-22.04
name: update zitadel api
steps:
- name: checkout source
uses: actions/checkout@v4
- name: check input tag
if: ${{github.event_name == 'workflow_dispatch'}}
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
echo "::set-output name=input::${INPUT}"
- name: get latest tag
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: set tag
id: tag
run: |
INPUT=${{steps.check-input.outputs.input}}
LATEST=${{steps.latest-tag.outputs.tag}}
TAG=${INPUT:-${LATEST}}
echo "input tag: ${INPUT}"
echo "latest tag: ${LATEST}"
echo "going to use: ${TAG}"
echo "::set-output name=tag::${TAG}"
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
## Workaround until https://github.com/docker/build-push-action/issues/252#issuecomment-804898823 is merged
version: v0.6.0
buildkitd-flags: --debug
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f build/zitadel/Dockerfile --build-arg TAG_NAME=${{steps.tag.outputs.tag}} . -o ./pkg/client
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: 'fix: update zitadel api to ${{steps.tag.outputs.tag}}'
branch: update-api
delete-branch: true
title: 'fix: Update ZITADEL API to ${{steps.tag.outputs.tag}}'
body: |
Update report
- latest zitadel tag: [${{steps.latest-tag.outputs.tag}}](https://github.com/zitadel/zitadel/releases/tag/${{steps.latest-tag.outputs.tag}})
- checked out zitadel version: [${{steps.tag.outputs.tag}}](https://github.com/zitadel/zitadel/releases/tag/${{steps.tag.outputs.tag}})
- generated clients
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
draft: false
reviewers: 'livio-a,stebenz,eliobischof'