update renovate schedule #1332
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: Generate konflux configurations | |
| on: | |
| pull_request: | |
| branches: | |
| - 'main' | |
| - 'release-v*' | |
| push: | |
| branches: | |
| - 'main' | |
| - 'release-v*' | |
| workflow_dispatch: # Manual workflow trigger | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-matrix: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| - id: set-matrix | |
| name: set-matrix | |
| run: | | |
| pushd config/downstream/releases | |
| VERSIONS=$(ls *.yaml | jq -R -s -c 'split("\n")[:-1] | map(split(".yaml")[0])+ ["main"]') | |
| popd | |
| echo "Versions: ${VERSIONS}" | |
| echo "versions=${VERSIONS}" >> $GITHUB_OUTPUT | |
| outputs: | |
| versions: ${{ steps.set-matrix.outputs.versions }} | |
| update-projects: | |
| needs: build-matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.build-matrix.outputs.versions) }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.25.x | |
| - name: Generate ${{matrix.version}} configurations and pull-requests | |
| run: | | |
| echo "Let's go" | |
| git config user.name openshift-pipelines-bot | |
| git config user.email pipelines-extcomm@redhat.com | |
| gh auth status | |
| gh auth setup-git | |
| go run ./cmd/konflux/ --version ${{ matrix.version }} --dry-run=${{ github.event_name == 'pull_request'}} | |
| env: | |
| GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }} | |
| GITHUB_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }} | |
| - name: Commit new changes | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| git config user.name openshift-pipelines-bot | |
| git config user.email pipelines-extcomm@redhat.com | |
| BASE_BRANCH=${GITHUB_REF#refs/heads/} | |
| SOURCE_BRANCH=actions/update/hack-update-konflux-${BASE_BRANCH}-${{matrix.version}} | |
| git checkout -b ${SOURCE_BRANCH} | |
| git add -f .konflux | |
| if [[ -z $(git status --porcelain --untracked-files=no) ]]; then | |
| echo "No change, exiting" | |
| exit 0 | |
| fi | |
| git commit -F- <<EOF | |
| [bot:${BASE_BRANCH}] Update Generated Konflux Config | |
| EOF | |
| git push -f origin ${SOURCE_BRANCH} | |
| if [ "$(gh pr list --base ${BASE_BRANCH} --head ${SOURCE_BRANCH} --json url --jq 'length')" = "0" ]; then | |
| echo "creating PR..." | |
| gh pr create -B ${BASE_BRANCH} -H ${SOURCE_BRANCH} --label=automated --fill | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |