diff --git a/.github/workflows/auto-merge-upstream.yaml b/.github/workflows/auto-merge-upstream.yaml new file mode 100644 index 0000000000..9f6e843208 --- /dev/null +++ b/.github/workflows/auto-merge-upstream.yaml @@ -0,0 +1,28 @@ +# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT +name: auto-merge-upstream-tektoncd-chains + +on: + workflow_dispatch: {} + schedule: + - cron: "*/30 * * * *" # At every 30 minutes + +jobs: + auto-approve: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Checkout the current repo + uses: actions/checkout@v4 + - name: auto-merge-upstream-tektoncd-chains + run: | + gh auth status + git config user.name openshift-pipelines-bot + git config user.email pipelines-extcomm@redhat.com + # Approve and merge pull-request with no reviews + for p in $(gh pr list --search "head:actions/update/sources-tektoncd-chains" --json "number" | jq ".[].number"); do + gh pr merge --rebase --delete-branch --auto $p + done + env: + GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }} + diff --git a/.github/workflows/update-sources.yaml b/.github/workflows/update-sources.yaml index 772fc15502..be4639c22b 100644 --- a/.github/workflows/update-sources.yaml +++ b/.github/workflows/update-sources.yaml @@ -1,16 +1,14 @@ -# Generated by openshift-pipelines/hack. DO NOT EDIT. -name: update-sources - +# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT +name: update-sources-tektoncd-chains on: workflow_dispatch: {} schedule: - - cron: "0 1 * * 1" # At 1AM every monday + - cron: "0 1 * * *" # At 1:00 everyday jobs: update-sources: runs-on: ubuntu-latest - if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere permissions: contents: write pull-requests: write @@ -25,15 +23,17 @@ jobs: rm -fR upstream git clone https://github.com/tektoncd/chains upstream pushd upstream - git checkout -B release-v0.24.x origin/release-v0.24.x + git checkout -B release-v0.26.x origin/release-v0.26.x popd - - - name: Commit new changes run: | + + set -x + git config user.name openshift-pipelines-bot git config user.email pipelines-extcomm@redhat.com git checkout -b actions/update/sources-next + touch head pushd upstream OLD_COMMIT=$(cat ../head) NEW_COMMIT=$(git rev-parse HEAD) diff --git a/.tekton/tektoncd-chains-next-controller-pull-request.yaml b/.tekton/tektoncd-chains-next-controller-pull-request.yaml index 56a41dd717..851f1ee12b 100644 --- a/.tekton/tektoncd-chains-next-controller-pull-request.yaml +++ b/.tekton/tektoncd-chains-next-controller-pull-request.yaml @@ -1,4 +1,4 @@ -# Generated for Konflux Application openshift-pipelines-core-next by openshift-pipelines/hack. DO NOT EDIT +# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT apiVersion: tekton.dev/v1 kind: PipelineRun metadata: @@ -15,7 +15,6 @@ metadata: ("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() || ".konflux/dockerfiles/controller.Dockerfile".pathChanged() || ".tekton/tektoncd-chains-next-controller-pull-request.yaml".pathChanged()) - creationTimestamp: null labels: appstudio.openshift.io/application: openshift-pipelines-core-next appstudio.openshift.io/component: tektoncd-chains-next-controller @@ -31,11 +30,14 @@ spec: - name: revision value: '{{revision}}' - name: output-image - value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/chains-controller-rhel9:on-pr-{{revision}} + value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/pipelines-chains-controller-rhel9:on-pr-{{revision}} - name: image-expires-after value: 5d - name: dockerfile value: .konflux/dockerfiles/controller.Dockerfile + - name: additional-tags + value: + - "on-pr-next" - name: build-platforms value: - linux/x86_64 diff --git a/.tekton/tektoncd-chains-next-controller-push.yaml b/.tekton/tektoncd-chains-next-controller-push.yaml index 130375de05..151f109716 100644 --- a/.tekton/tektoncd-chains-next-controller-push.yaml +++ b/.tekton/tektoncd-chains-next-controller-push.yaml @@ -1,4 +1,4 @@ -# Generated for Konflux Application openshift-pipelines-core-next by openshift-pipelines/hack. DO NOT EDIT +# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT apiVersion: tekton.dev/v1 kind: PipelineRun metadata: @@ -25,14 +25,17 @@ spec: params: - name: git-url value: '{{source_url}}' - - name: revision - value: '{{revision}}' - name: upstream-git-url value: 'https://github.com/tektoncd/chains' + - name: revision + value: '{{revision}}' - name: output-image - value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/chains-controller-rhel9:{{revision}} + value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/pipelines-chains-controller-rhel9:{{revision}} - name: dockerfile value: .konflux/dockerfiles/controller.Dockerfile + - name: additional-tags + value: + - "next" - name: prefetch-input value: | {"type": "rpm", "path": ".konflux/rpms"}