Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential github action smells #8075

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
merge_group:
branches: [main, 1.*.x]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
# Require writing security events to upload SARIF file to security tab
security-events: write
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sure that the workflow cannot make any other changes than alter anything related to GitHub Actions.
For security purposes, it is generally recommended to only give workflows the minimal possible permissions to a repository.

steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
tests:
name: Release
runs-on: ubuntu-latest

if: github.repository == 'appwrite/appwrite'
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
stale:
runs-on: ubuntu-latest

if: github.repository == 'appwrite/appwrite'
steps:
- uses: actions/stale@v9
with:
Expand Down