023eb3380d
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
43 lines
954 B
YAML
43 lines
954 B
YAML
name: Linux Examples
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- 'src/**'
|
|
- 'examples/**'
|
|
- '.github/workflows/linux_examples.yml'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'src/**'
|
|
- 'examples/**'
|
|
- '.github/workflows/linux_examples.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Environment
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
|
|
|
- name: Build Library
|
|
run: |
|
|
cd src
|
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC
|
|
cd ..
|
|
|
|
- name: Build Examples
|
|
run: |
|
|
cd examples
|
|
make PLATFORM=PLATFORM_DESKTOP -B
|
|
cd ..
|