diff --git a/.github/workflows/update-apis.yml b/.github/workflows/update-apis.yml new file mode 100644 index 00000000..e400e2a9 --- /dev/null +++ b/.github/workflows/update-apis.yml @@ -0,0 +1,51 @@ +# This action checks API updates every day at 5:00 UTC. +name: Update API code generation + +on: + workflow_dispatch: + schedule: + - cron: "0 5 * * *" + +jobs: + update-api: + name: "Update API definitions" + if: github.repository == 'osbuild/image-builder-frontend' + runs-on: ubuntu-latest + + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Use Node.js 22 + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Mark the working directory as safe for git + run: git config --global --add safe.directory "$(pwd)" + + - name: Run API code generation + run: npm run api + + - name: Check if there are any changes + run: | + if [ "$(git status --porcelain)" ]; then + echo + echo "API codegen is up-to-date" + exit "0" + fi + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + branch: update-apis + delete-branch: true + title: "api: regenerate api code generation" + commit-message: "api: regenerate api code generation" + body: Update api code generation + token: ${{ secrets.SCHUTZBOT_GITHUB_ACCESS_TOKEN }} + author: schutzbot diff --git a/src/store/cockpit/composerCloudApi.ts b/src/store/cockpit/composerCloudApi.ts index 36be0f46..4c97a303 100644 --- a/src/store/cockpit/composerCloudApi.ts +++ b/src/store/cockpit/composerCloudApi.ts @@ -50,7 +50,6 @@ export type UploadTypes = | "azure" | "container" | "oci.objectstorage" - | "pulp.ostree" | "local"; export type Awsec2UploadStatus = { ami: string;