feat: added cache clearing and config.json update #76
Workflow file for this run
This file contains hidden or 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: release-pullrequest | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| GHCR_REPO: ghcr.io/${{ github.repository }} | |
| jobs: | |
| build: | |
| name: Build and NOT Push | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Dockerfile (multi-arch, no push) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| cache-from: type=registry,ref=${{ env.GHCR_REPO }}:buildcache | |
| cache-to: type=inline # Use inline cache for PR builds to prevent concurrency issues | |
| crds: | |
| name: Generate crds | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Install krateoctl v0.8.9 | |
| run: curl -sL https://raw.githubusercontent.com/krateoplatformops/krateoctl/main/install.sh 0.8.9 | bash | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install tsx, chalk | |
| run: | | |
| npm install tsx chalk | |
| - name: Generate crds | |
| run: | | |
| npm run generate-crds | |
| - name: List files in /scripts/krateoctl-output | |
| run: | | |
| ls -la ./scripts/krateoctl-output | |
| - name: Upload .yaml files from /scripts/krateoctl-output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-crds-yaml-files | |
| path: ${{ github.workspace }}/scripts/krateoctl-output/*.yaml |