From 2fa5331782b643ff70982ee584041c04cd3d996e Mon Sep 17 00:00:00 2001 From: pulpbot Date: Thu, 1 Oct 2026 12:06:06 +0000 Subject: [PATCH] Update cookiecutter --- .ci/scripts/release.sh | 2 +- .github/workflows/build.yml | 10 ++------- .github/workflows/codeql.yml | 9 +++----- .github/workflows/collect_changes.yml | 12 ++-------- .github/workflows/cookiecutter.yml | 32 ++++++++++----------------- .github/workflows/lint.yml | 6 ----- .github/workflows/nightly.yml | 10 ++------- .github/workflows/pr.yml | 8 +------ .github/workflows/pr_checks.yml | 11 +++------ .github/workflows/publish.yml | 4 ---- .github/workflows/release.yml | 10 +-------- .github/workflows/release_branch.yml | 16 +++----------- .github/workflows/test.yml | 6 ----- 13 files changed, 30 insertions(+), 106 deletions(-) diff --git a/.ci/scripts/release.sh b/.ci/scripts/release.sh index 41d2677..a9c3644 100755 --- a/.ci/scripts/release.sh +++ b/.ci/scripts/release.sh @@ -23,4 +23,4 @@ towncrier build --yes --version "${NEW_VERSION}" bump-my-version bump release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty bump-my-version bump patch --commit -git push --atomic origin "${BRANCH}" "${NEW_VERSION}" +git push origin "${BRANCH}" "${NEW_VERSION}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a16276..d7c6a4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,18 +4,12 @@ name: "Build" on: workflow_call: -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: build: runs-on: "ubuntu-latest" steps: - name: "Checkout" uses: "actions/checkout@v6" - with: - path: "pulp-cli-gem" - name: "Set up Python" uses: "actions/setup-python@v6" with: @@ -28,14 +22,14 @@ jobs: - name: "Build wheels" run: | make build - touch ../.root + touch .root - name: "Upload wheels" uses: "actions/upload-artifact@v6" with: name: "pulp_cli_packages" path: | .root - pulp-cli-gem/dist/ + dist/ if-no-files-found: "error" retention-days: 5 ... diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e3be2d4..facb1a8 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,12 +2,11 @@ name: "CodeQL" on: + push: + branches: + - "main" workflow_call: -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: analyze: name: "Analyze" @@ -20,8 +19,6 @@ jobs: steps: - name: "Checkout" uses: "actions/checkout@v6" - with: - path: "pulp-cli-gem" - name: "Initialize CodeQL" uses: "github/codeql-action/init@v4" with: diff --git a/.github/workflows/collect_changes.yml b/.github/workflows/collect_changes.yml index 1722e2d..5e08242 100644 --- a/.github/workflows/collect_changes.yml +++ b/.github/workflows/collect_changes.yml @@ -4,21 +4,13 @@ on: workflow_call: workflow_dispatch: -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: collect-changes: - permissions: - contents: "write" - pull-requests: "write" runs-on: "ubuntu-latest" steps: - name: "Checkout" uses: "actions/checkout@v6" with: - path: "pulp-cli-gem" fetch-depth: 0 - name: "Set up Python" uses: "actions/setup-python@v6" @@ -40,16 +32,16 @@ jobs: uses: "peter-evans/create-pull-request@v8" id: "create_pr" with: + token: "${{ secrets.RELEASE_TOKEN }}" title: "Update Changelog" body: "" branch: "update_changes" delete-branch: true - path: "pulp-cli-gem" - name: "Mark PR automerge" run: | gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}" if: "steps.create_pr.outputs.pull-request-number" env: - GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" continue-on-error: true ... diff --git a/.github/workflows/cookiecutter.yml b/.github/workflows/cookiecutter.yml index 0c028c3..09995d4 100644 --- a/.github/workflows/cookiecutter.yml +++ b/.github/workflows/cookiecutter.yml @@ -11,21 +11,16 @@ defaults: jobs: update-ci: - permissions: - contents: "write" - pull-requests: "write" runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v6" with: repository: "pulp/pulp-cli" - ref: "main" - path: "pulp-cli_cc" - - name: "Checkout" - uses: "actions/checkout@v6" + path: "pulp-cli" + - uses: "actions/checkout@v6" with: - path: "pulp-cli-gem" token: "${{ secrets.RELEASE_TOKEN }}" + path: "pulp-cli-gem" - name: "Set up Python" uses: "actions/setup-python@v6" with: @@ -41,7 +36,7 @@ jobs: git config user.email pulp-infra@redhat.com - name: "Apply cookiecutter templates" run: | - uv run ../pulp-cli_cc/cookiecutter/apply_templates.py + uv run ../pulp-cli/cookiecutter/apply_templates.py if [ "$(git status --porcelain)" ] then git add . @@ -51,33 +46,29 @@ jobs: uses: "peter-evans/create-pull-request@v8" id: "create_pr" with: + token: "${{ secrets.RELEASE_TOKEN }}" title: "Update cookiecutter" body: "" branch: "update_cookiecutter" delete-branch: true path: "pulp-cli-gem" - token: "${{ secrets.RELEASE_TOKEN }}" - name: "Mark PR automerge" run: | gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}" if: "steps.create_pr.outputs.pull-request-number" env: - GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" continue-on-error: true update-dependencies: - permissions: - contents: "write" - pull-requests: "write" runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v6" with: repository: "pulp/pulp-cli" - branch: "main" - path: "pulp-cli_cc" - - name: "Checkout" - uses: "actions/checkout@v6" + path: "pulp-cli" + - uses: "actions/checkout@v6" with: + token: "${{ secrets.RELEASE_TOKEN }}" path: "pulp-cli-gem" - name: "Set up Python" uses: "actions/setup-python@v6" @@ -94,7 +85,7 @@ jobs: git config user.email pulp-infra@redhat.com - name: "Apply cookiecutter templates" run: | - uv run ../pulp-cli_cc/cookiecutter/update_pulp_cli.py + uv run ../pulp-cli/cookiecutter/update_pulp_cli.py if [ "$(git status --porcelain)" ] then git add . @@ -104,6 +95,7 @@ jobs: uses: "peter-evans/create-pull-request@v8" id: "create_pr" with: + token: "${{ secrets.RELEASE_TOKEN }}" title: "Update CLI and GLUE" body: "" branch: "update_cli" @@ -114,6 +106,6 @@ jobs: gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}" if: "steps.create_pr.outputs.pull-request-number" env: - GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" continue-on-error: true ... diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4d9cc40..fee95cd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,10 +4,6 @@ name: "Lint" on: workflow_call: -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: lint: runs-on: "ubuntu-latest" @@ -20,8 +16,6 @@ jobs: steps: - name: "Checkout" uses: "actions/checkout@v6" - with: - path: "pulp-cli-gem" - name: "Set up Python" uses: "actions/setup-python@v6" with: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8ec5b26..cf39225 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,5 +1,5 @@ --- -name: "Nightly" +name: "pulp-cli Nightly" on: schedule: @@ -14,14 +14,8 @@ jobs: - "build" uses: "./.github/workflows/test.yml" codeql: - permissions: - actions: "read" - contents: "read" - security-events: "write" uses: "./.github/workflows/codeql.yml" collect_changes: - permissions: - contents: "write" - pull-requests: "write" uses: "./.github/workflows/collect_changes.yml" + secrets: "inherit" ... diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6188319..5617875 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,5 +1,5 @@ --- -name: "Pull Request" +name: "pulp-cli CI" on: pull_request: @@ -22,10 +22,6 @@ jobs: codeql: needs: - "lint" - permissions: - actions: "read" - contents: "read" - security-events: "write" uses: "./.github/workflows/codeql.yml" check-commits: runs-on: "ubuntu-latest" @@ -33,7 +29,6 @@ jobs: - name: "Checkout" uses: "actions/checkout@v6" with: - path: "pulp-cli-gem" fetch-depth: 0 - name: "Set up Python" uses: "actions/setup-python@v6" @@ -58,7 +53,6 @@ jobs: fi done shell: "bash" - working-directory: "pulp-cli-gem" ready-to-ship: # This is a dummy dependent task to have a single entry for the branch protection rules. runs-on: "ubuntu-latest" diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 3f2234d..c031756 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -1,5 +1,5 @@ --- -name: "PR static checks" +name: "Pulp CLI PR static checks" on: pull_request_target: types: ["opened", "synchronize", "reopened"] @@ -12,21 +12,16 @@ concurrency: group: "${{ github.event.pull_request.number }}-${{ github.workflow }}" cancel-in-progress: true -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: apply_labels: - permissions: - pull-requests: "write" runs-on: "ubuntu-latest" name: "Label PR" + permissions: + pull-requests: "write" steps: - name: "Checkout" uses: "actions/checkout@v6" with: - path: "pulp-cli-gem" fetch-depth: 0 - name: "Set up Python" uses: "actions/setup-python@v6" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7130974..8e9a9fa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,10 +6,6 @@ on: tags: - "[0-9]+.[0-9]+.[0-9]+" -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: build: uses: "./.github/workflows/build.yml" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95c39a0..c430d65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,21 +4,13 @@ name: "Tag Release" on: workflow_dispatch: -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: release: name: "Release" - permissions: - contents: "write" runs-on: "ubuntu-latest" steps: - - name: "Checkout" - uses: "actions/checkout@v6" + - uses: "actions/checkout@v6" with: - path: "pulp-cli-gem" token: "${{ secrets.RELEASE_TOKEN }}" - name: "Set up Python" uses: "actions/setup-python@v6" diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index bafb086..f20a5ef 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -3,22 +3,12 @@ name: "Create Release Branch" on: workflow_dispatch: -defaults: - run: - working-directory: "pulp-cli-gem" - jobs: create-release-branch: - permissions: - contents: "write" - issues: "write" - pull-requests: "write" runs-on: "ubuntu-latest" steps: - - name: "Checkout" - uses: "actions/checkout@v6" + - uses: "actions/checkout@v6" with: - path: "pulp-cli-gem" token: "${{ secrets.RELEASE_TOKEN }}" - name: "Set up Python" uses: "actions/setup-python@v6" @@ -40,17 +30,17 @@ jobs: uses: "peter-evans/create-pull-request@v8" id: "create_pr" with: + token: "${{ secrets.RELEASE_TOKEN }}" title: "Bump dev-version" body: "" branch: "bump_version" delete-branch: true - path: "pulp-cli-gem" - name: "Mark PR automerge" run: | gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}" if: "steps.create_pr.outputs.pull-request-number" env: - GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" continue-on-error: true - name: "Add Backport Label for new Branch" uses: "actions/github-script@v8" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15bf972..65c5b65 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,6 @@ name: "Test" on: workflow_call: -defaults: - run: - working-directory: "pulp-cli-gem" - env: COLORTERM: "yes" TERM: "xterm-256color" @@ -32,8 +28,6 @@ jobs: steps: - name: "Checkout" uses: "actions/checkout@v6" - with: - path: "pulp-cli-gem" - name: "Download wheels" uses: "actions/download-artifact@v8" with: