Switch the openapi-codegen to our docker image #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Codegen | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
# When pushing to a PR, cancel any jobs still running for the previous head commit of the PR | |
concurrency: | |
# head_ref is only defined for pull requests, run_id is always unique and defined so if this | |
# workflow was not triggered by a pull request, nothing gets cancelled. | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-git-consistency: | |
name: Check for uncommitted changes | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
# until we merge https://github.com/svix/openapi-codegen/pull/82, I will have to build this image in CI | |
- run: docker image build -t ghcr.io/svix/openapi-codegen https://github.com/svix/openapi-codegen.git#mendy/add-docker-builds | |
- name: Regen openapi libs | |
run: | | |
./regen_openapi.sh | |
- name: Check for uncommitted changes | |
run: | | |
gs=$(git status -s) | |
if [[ -n "$gs" ]]; then | |
echo 'there are uncommitted changes!' | |
git status | |
exit 1 | |
else | |
echo 'all good.' | |
fi |