diff --git a/.github/workflows/update-builder.yaml b/.github/workflows/update-builder.yaml deleted file mode 100644 index beb4427d88..0000000000 --- a/.github/workflows/update-builder.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Update builder-jammy-full image - -on: - schedule: - - cron: '0 */4 * * *' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build-and-push-image: - permissions: - contents: read - packages: write - runs-on: "ubuntu-latest" - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - uses: knative/actions/setup-go@main - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Build and Push - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - docker run -d -p 5000:5000 --name registry registry:2.7 - echo '{"insecure-registries" : "localhost:5000" }' | \ - sudo tee /etc/docker/daemon.json - mkdir -p "$HOME/.config/containers/" - echo -e '\n[[registry]]\nlocation = "localhost:5000"\ninsecure = true\n' >> \ - "$HOME/.config/containers/registries.conf" - skopeo login ghcr.io -u gh-action -p "$GITHUB_TOKEN" - docker login ghcr.io -u gh-action -p "$GITHUB_TOKEN" - make __update-builder - diff --git a/.github/workflows/update-ca-bundle.yaml b/.github/workflows/update-ca-bundle.yaml deleted file mode 100644 index 56bb9bcbdf..0000000000 --- a/.github/workflows/update-ca-bundle.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Update CA bundle in embedded templates - -permissions: - contents: write - pull-requests: write - -on: - schedule: - - cron: '0 */4 * * *' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - update: - name: Update CA bundle - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Install NPM deps. - run: npm install octokit@3.2.1 - - name: Create PR - env: - GITHUB_TOKEN: ${{ github.token }} - run: node ./hack/update-ca-bundle.js - diff --git a/.github/workflows/update-deps.yaml b/.github/workflows/update-deps.yaml new file mode 100644 index 0000000000..4af940f76e --- /dev/null +++ b/.github/workflows/update-deps.yaml @@ -0,0 +1,115 @@ +name: Update Dependencies + +on: + schedule: + - cron: '0 */4 * * *' + - cron: '0 6 * * *' + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + packages: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + update-builder: + name: Update builder-jammy-full image + runs-on: "ubuntu-latest" + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: knative/actions/setup-go@main + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Build and Push + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + docker run -d -p 5000:5000 --name registry registry:2.7 + echo '{"insecure-registries" : "localhost:5000" }' | \ + sudo tee /etc/docker/daemon.json + mkdir -p "$HOME/.config/containers/" + echo -e '\n[[registry]]\nlocation = "localhost:5000"\ninsecure = true\n' >> \ + "$HOME/.config/containers/registries.conf" + skopeo login ghcr.io -u gh-action -p "$GITHUB_TOKEN" + docker login ghcr.io -u gh-action -p "$GITHUB_TOKEN" + make __update-builder + + update-python: + name: Update func-python version + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: knative/actions/setup-go@main + - name: Run update script + run: go run ./hack/cmd/update-python-platform/main.go + - name: Run make generate + run: make generate/zz_filesystem_generated.go + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Run smoke tests + run: make test-python + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ github.token }} + commit-message: 'chore: update func-python version' + title: 'chore: update func-python version' + body: | + This PR updates the func-python version in the Python scaffolding templates to the latest version available on PyPI. + + This PR was automatically generated by the [update-deps workflow](https://github.com/${{ github.repository }}/actions/workflows/update-deps.yaml). + branch: update-func-python + delete-branch: true + committer: Knative Automation + author: Knative Automation + assignees: gauron99, matejvasek, lkingland + base: main + + update-platforms: + name: Update ${{ matrix.name }} + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + include: + - name: "CA bundle" + script: ./hack/update-ca-bundle.js + npm_deps: "octokit@3.2.1" + with_java: false + with_go: false + - name: "Quarkus Platform" + script: ./hack/update-quarkus-platform.js + npm_deps: "xml2js@0.6.2 octokit@3.2.1" + with_java: true + with_go: true + - name: "Spring Boot Platform" + script: ./hack/update-springboot-platform.js + npm_deps: "xml2js@0.6.2 octokit@3.2.1 yaml@2.4.5 semver@7.6.3" + with_java: true + with_go: true + steps: + - uses: actions/checkout@v4 + - uses: knative/actions/setup-go@main + if: matrix.with_go + - uses: actions/setup-node@v4 + with: + node-version: "20" + - uses: actions/setup-java@v4 + if: matrix.with_java + with: + java-version: 21 + distribution: 'temurin' + - name: Install NPM deps. + run: npm install ${{ matrix.npm_deps }} + - name: Create PR + env: + GITHUB_TOKEN: ${{ github.token }} + run: node ${{ matrix.script }} diff --git a/.github/workflows/update-python-platform.yaml b/.github/workflows/update-python-platform.yaml deleted file mode 100644 index 4a4a0da22c..0000000000 --- a/.github/workflows/update-python-platform.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: Update func-python version in embedded templates - -permissions: - contents: write - pull-requests: write - -on: - schedule: - - cron: "0 6 * * *" # Daily at 06:00. - workflow_dispatch: # Manual workflow trigger - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - update: - name: Update func-python version - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - - uses: knative/actions/setup-go@main - - - name: Run update script - run: go run ./hack/cmd/update-python-platform/main.go - - - name: Run make generate - run: make generate/zz_filesystem_generated.go - - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: Run smoke tests - run: make test-python - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 - with: - token: ${{ github.token }} - commit-message: 'chore: update func-python version' - title: 'chore: update func-python version' - body: | - This PR updates the func-python version in the Python scaffolding templates to the latest version available on PyPI. - - This PR was automatically generated by the [update-python-platform workflow](https://github.com/${{ github.repository }}/actions/workflows/update-python-platform.yaml). - branch: update-func-python - delete-branch: true - committer: Knative Automation - author: Knative Automation - assignees: gauron99, matejvasek, lkingland - base: main diff --git a/.github/workflows/update-quarkus-platform.yaml b/.github/workflows/update-quarkus-platform.yaml deleted file mode 100644 index 11e4284fa0..0000000000 --- a/.github/workflows/update-quarkus-platform.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Update Quarkus Platform in embedded templates - -permissions: - contents: write - pull-requests: write - -on: - schedule: - - cron: '0 */4 * * *' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - update: - name: Update Quarkus Platform - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - uses: knative/actions/setup-go@main - - uses: actions/setup-node@v4 - with: - node-version: "20" - - uses: actions/setup-java@v4 - with: - java-version: 21 - distribution: 'temurin' - - name: Install NPM deps. - run: npm install xml2js@0.6.2 octokit@3.2.1 - - name: Create PR - env: - GITHUB_TOKEN: ${{ github.token }} - run: node ./hack/update-quarkus-platform.js - diff --git a/.github/workflows/update-springboot-platform.yaml b/.github/workflows/update-springboot-platform.yaml deleted file mode 100644 index feb0b50c5d..0000000000 --- a/.github/workflows/update-springboot-platform.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Update Spring Boot Platform in embedded templates - -permissions: - contents: write - pull-requests: write - -on: - schedule: - - cron: '0 */4 * * *' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - update: - name: Update Spring Boot Platform - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - uses: knative/actions/setup-go@main - - uses: actions/setup-node@v4 - with: - node-version: "20" - - uses: actions/setup-java@v4 - with: - java-version: 21 - distribution: 'temurin' - - name: Install NPM deps. - run: npm install xml2js@0.6.2 octokit@3.2.1 yaml@2.4.5 semver@7.6.3 - - name: Create PR - env: - GITHUB_TOKEN: ${{ github.token }} - run: node ./hack/update-springboot-platform.js -