Skip to content

Rolling

Rolling #11309

Workflow file for this run

---
name: Rolling
on:
workflow_dispatch:
schedule:
- cron: "42 * * * *"
permissions:
contents: write
jobs:
rolling:
runs-on: ubuntu-latest
steps:
- id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: "${{ secrets.GH_APP_ID }}"
private-key: "${{ secrets.GH_APP_PRIV_KEY }}"
- id: get-user-id
name: Get GitHub app user ID
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: "${{ steps.app-token.outputs.token }}"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: "${{ steps.app-token.outputs.token }}"
path: client-rust
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- name: Fetch schema
id: fetch-schema
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: goauthentik/authentik
token: "${{ steps.app-token.outputs.token }}"
ref: "main"
path: authentik
sparse-checkout: |
schema.yml
sparse-checkout-cone-mode: false
- name: Push
working-directory: client-rust
run: |
cp ../authentik/schema.yml .
git diff --exit-code -- schema.yml > /dev/null && exit 0
version="$(cat schema.yml | yq -r .info.version)"
make build version="$(cat schema.yml | yq -r .info.version)"
git checkout README.md
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
git add .
git commit -m "Update to https://github.com/goauthentik/authentik/commits/${{ steps.fetch-schema.outputs.commit }}"
git push origin main
env:
GH_TOKEN: "${{ steps.app-token.outputs.token }}"
RUSTFLAGS: -Awarnings