diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..1c120031 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>konflux-ci/mintmaker//config/renovate/renovate.json" + ], + "enabledManagers": [ + "tekton", + "dockerfile", + "rpm-lockfile" + ], + "addLabels": [ + "approved", + "lgtm", + "konflux", + "mintmaker" + ], + "ignorePaths": ["upstream/**"], + "autoApprove": true, + "packageRules": [ + { + "matchPackageNames": ["*"], + "automerge": true + } + ] +} diff --git a/.github/workflows/auto-merge-upstream-console-plugin.yaml b/.github/workflows/auto-merge-upstream-console-plugin.yaml new file mode 100644 index 00000000..471445bc --- /dev/null +++ b/.github/workflows/auto-merge-upstream-console-plugin.yaml @@ -0,0 +1,28 @@ +# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT +name: auto-merge-upstream-console-plugin + +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-console-plugin + 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-console-plugin" --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-console-plugin.yaml b/.github/workflows/update-sources-console-plugin.yaml new file mode 100644 index 00000000..765fa7f9 --- /dev/null +++ b/.github/workflows/update-sources-console-plugin.yaml @@ -0,0 +1,75 @@ +# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT +name: update-sources-console-plugin + +on: + workflow_dispatch: {} + schedule: + - cron: "0 1 * * *" # At 1AM everyday + +jobs: + + update-sources: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout the current repo + uses: actions/checkout@v4 + with: + ref: release-v1.22.x + + - name: Clone openshift-pipelines/console-plugin + run: | + rm -fR upstream + git clone https://github.com/openshift-pipelines/console-plugin upstream + pushd upstream + git checkout -B main origin/main + 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-release-v1.22.x + touch head + pushd upstream + OLD_COMMIT=$(cat ../head) + NEW_COMMIT=$(git rev-parse HEAD) + echo Previous commit: ${OLD_COMMIT} + git show --stat ${OLD_COMMIT} + echo New commit: ${NEW_COMMIT} + git show --stat ${NEW_COMMIT} + git diff --stat ${NEW_COMMIT}..${OLD_COMMIT} > /tmp/diff.txt + git rev-parse HEAD > ../head + popd + rm -rf upstream/.git + git add -f upstream head .konflux + + if [[ -z $(git status --porcelain --untracked-files=no) ]]; then + echo "No change, exiting" + exit 0 + fi + + git commit -F- <