]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
Merge pull request #547 from stgraber/master
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Jul 2022 21:33:10 +0000 (23:33 +0200)
committerGitHub <noreply@github.com>
Tue, 5 Jul 2022 21:33:10 +0000 (23:33 +0200)
Complete Github Actions migration

.github/workflows/builds.yml
.github/workflows/commits.yml
.github/workflows/tests.yml

index b3e5d9e0812441cca03b23b4156a82b3c965fe76..5b2b868438e781054766467b99ee25ba6c57c7be 100644 (file)
@@ -4,6 +4,9 @@ on:
     branches:
       - master
 
+permissions:
+  contents: read
+
 jobs:
   coverity:
     name: Coverity
index c899249256eb8633cd64462e6ec4b952b1c3ee01..57f5d6954acbaf4eb8b8da991b0a1b4dc296f02d 100644 (file)
@@ -2,8 +2,13 @@ name: Commits
 on:
   - pull_request
 
+permissions:
+  contents: read
+
 jobs:
   dco-check:
+    permissions:
+      pull-requests: read  # for tim-actions/get-pr-commits to get list of commits from the PR
     name: Signed-off-by (DCO)
     runs-on: ubuntu-20.04
     steps:
@@ -17,3 +22,19 @@ jobs:
       uses: tim-actions/dco@master
       with:
         commits: ${{ steps.get-pr-commits.outputs.commits }}
+
+  target-branch:
+    permissions:
+      contents: none
+    name: Branch target
+    runs-on: ubuntu-20.04
+    steps:
+    - name: Check branch target
+      env:
+        TARGET: ${{ github.event.pull_request.base.ref }}
+      run: |
+        set -x
+        [ "${TARGET}" = "master" ] && exit 0
+
+        echo "Invalid branch target: ${TARGET}"
+        exit 1
index dd0ef0713589aa0f43947dc8ee5920a3ca97d01d..204b5c8634e30b9d2b14b52f5ec23264352b9138 100644 (file)
@@ -3,6 +3,9 @@ on:
   - push
   - pull_request
 
+permissions:
+  contents: read
+
 jobs:
   fuse2:
     name: FUSE2