Skip to content

Commit

Permalink
[build, test] Harden workflows' security (yt-dlp#5410)
Browse files Browse the repository at this point in the history
Authored by: sashashura
  • Loading branch information
sashashura authored Nov 10, 2022
1 parent ed6bec1 commit c789fb7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Build
on: workflow_dispatch
permissions:
contents: read

jobs:
prepare:
permissions:
contents: write # for push_release
runs-on: ubuntu-latest
outputs:
version_suffix: ${{ steps.version_suffix.outputs.version_suffix }}
Expand Down Expand Up @@ -69,9 +73,6 @@ jobs:
python pyinst.py --onedir
(cd ./dist/yt-dlp_linux && zip -r ../yt-dlp_linux.zip .)
python pyinst.py
- name: Get SHA2-SUMS
id: get_sha
run: |
- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -248,6 +249,8 @@ jobs:
publish_release:
permissions:
contents: write # for action-gh-release
runs-on: ubuntu-latest
needs: [prepare, build_unix, build_windows, build_windows32, build_macos, build_macos_legacy]

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Core Tests
on: [push, pull_request]
permissions:
contents: read

jobs:
tests:
name: Core Tests
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/download.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Download Tests
on: [push, pull_request]
permissions:
contents: read

jobs:
quick:
name: Quick Download Tests
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/quick-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Quick Test
on: [push, pull_request]
permissions:
contents: read

jobs:
tests:
name: Core Test
Expand Down

0 comments on commit c789fb7

Please sign in to comment.