Skip to content

Commit

Permalink
Merge pull request #3084 from sashashura/patch-1
Browse files Browse the repository at this point in the history
GitHub Workflows security hardening
  • Loading branch information
PowerKiKi authored Dec 12, 2023
2 parents 689f961 + da0269d commit 5aaed9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ on:
tags:
- '*'

permissions: {}
jobs:
github-pages:
permissions:
contents: write # to push pages branch (peaceiris/actions-gh-pages)

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: main
on: [ push, pull_request, merge_group ]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -241,6 +243,8 @@ jobs:
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover coverage-clover.xml
release:
permissions:
contents: write # to create a release (actions/create-release)
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
Expand Down

0 comments on commit 5aaed9e

Please sign in to comment.