Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: write

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -17,6 +14,8 @@ jobs:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: 'false'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -37,11 +36,16 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set git user for hawkdeploy
persist-credentials: 'false'
- name: Generate GitHub App token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.HAWKY_APP_ID }}
private_key: ${{ secrets.HAWKY_APP_PRIVATE_KEY }}
- name: Set up git for pushing
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git
- name: Show git user and remote
run: |
git config --get user.name
Expand Down Expand Up @@ -71,11 +75,16 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set git user for hawkdeploy
persist-credentials: 'false'
- name: Generate GitHub App token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.HAWKY_APP_ID }}
private_key: ${{ secrets.HAWKY_APP_PRIVATE_KEY }}
- name: Set up git for pushing
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
- name: Set git user for github-actions
- name: Generate GitHub App token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.HAWKY_APP_ID }}
private_key: ${{ secrets.HAWKY_APP_PRIVATE_KEY }}
- name: Set up git for pushing
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git
- name: Bump minor version with bumpver
run: bumpver update --minor --commit
- name: Push version bump commit
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ name: Release
on:
workflow_dispatch:

permissions:
contents: write
issues: write
id-token: write

jobs:
approval:
name: Manual Approval
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.HAWKY_APP_ID }}
private_key: ${{ secrets.HAWKY_APP_PRIVATE_KEY }}
- name: Wait for manual approval
uses: trstringer/manual-approval@v1
with:
secret: ${{ secrets.GITHUB_TOKEN }}
secret: ${{ steps.generate_token.outputs.token }}
issue-title: "Release Approval for ${{ github.ref_name }}"
issue-body: "Please approve this release to publish to PyPI and Docker."
approvers: sgerlach,kcberg,danielhopkins,clamey,Bwvolleyball
issue-body: "Please approve the release for ${{ github.ref_name }}."
approvers: engineering
minimum-approvals: 1
mode: issue
fail-on-denial: true
Expand All @@ -41,8 +42,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
persist-credentials: 'false'
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -65,8 +65,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
persist-credentials: 'false'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,3 @@ Contributions are welcome! Please open issues or pull requests for bug fixes, ne
## License

Apache License 2.0. See [LICENSE](LICENSE) for details.

## GitHub Actions

Workflows are being updated to improve git permissions for CI/CD automation. See the `fix/git-permission-issues` branch for details.