-
Notifications
You must be signed in to change notification settings - Fork 67
feat: add pinact-action to automate GitHub Actions SHA pinning (do not merge) #802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
362a8ec
9df63fc
b83d68e
1a0c230
3e67129
8f87ad5
e5126a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
- name: Run actionlint | ||
uses: reviewdog/[email protected] | ||
uses: reviewdog/action-actionlint@95395aac8c053577d0bc67eb7b74936c660c6f66 # v1.67.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-review | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
steps: | ||
- name: Add Auto-Merge Notice | ||
if: github.event.action == 'auto_merge_enabled' | ||
uses: bcgov/[email protected] | ||
uses: bcgov/action-pr-description-add@14338bfe0278ead273b3c1189e5aa286ff6709c4 # v2.0.0 | ||
with: | ||
add_markdown: | | ||
> [!IMPORTANT] | ||
|
@@ -24,7 +24,7 @@ jobs: | |
|
||
- name: Remove Auto-Merge Notice | ||
if: github.event.action == 'auto_merge_disabled' | ||
uses: bcgov/[email protected] | ||
uses: bcgov/action-pr-description-add@14338bfe0278ead273b3c1189e5aa286ff6709c4 # v2.0.0 | ||
with: | ||
add_markdown: | | ||
> [!NOTE] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: On-Demand GitHub Actions Pin Fix | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pr: | ||
description: 'PR Number' | ||
type: string | ||
required: true | ||
comment-id: | ||
description: 'Comment ID (Optional)' | ||
type: string | ||
required: false | ||
|
||
permissions: | ||
contents: write | ||
workflows: write | ||
pull-requests: write | ||
Comment on lines
+15
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid permission scope prevents workflow linting 🤖 Prompt for AI Agents
|
||
|
||
env: | ||
AIRBYTE_ANALYTICS_ID: ${{ vars.AIRBYTE_ANALYTICS_ID }} | ||
|
||
jobs: | ||
gh-ci-fix: | ||
name: Pin GitHub Actions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Authenticate as GitHub App | ||
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 | ||
id: get-app-token | ||
with: | ||
owner: "airbytehq" | ||
repositories: "PyAirbyte" | ||
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }} | ||
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }} | ||
|
||
- name: Run Poe Command | ||
uses: aaronsteers/poe-command-processor@04330aa7047b6b182ff280a962cbbcd99d6eb683 # v1.3.0 | ||
with: | ||
command: "gh-ci-fix" | ||
github-token: ${{ steps.get-app-token.outputs.token }} | ||
pr: ${{ github.event.inputs.pr }} | ||
comment-id: ${{ github.event.inputs.comment-id }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,10 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v5 | ||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
with: | ||
fetch-depth: 0 | ||
- uses: hynek/build-and-inspect-python-package@v2 | ||
- uses: hynek/build-and-inspect-python-package@c52c3a4710070b50470d903818a7b25115dcd076 # v2.13.0 | ||
|
||
publish: | ||
name: Publish to PyPI | ||
|
@@ -29,12 +29,12 @@ jobs: | |
url: https://pypi.org/p/airbyte | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | ||
with: | ||
name: Packages | ||
path: dist | ||
- name: Upload wheel to release | ||
uses: svenstaro/upload-release-action@v2 | ||
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # latest | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist/*.whl | ||
|
@@ -43,4 +43,4 @@ jobs: | |
file_glob: true | ||
|
||
- name: Publish | ||
uses: pypa/[email protected] | ||
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [actionlint] reported by reviewdog 🐶
unknown permission scope "workflows". all available permission scopes are "actions", "attestations", "checks", "contents", "deployments", "discussions", "id-token", "issues", "packages", "pages", "pull-requests", "repository-projects", "security-events", "statuses" [permissions]