File tree Expand file tree Collapse file tree 2 files changed +41
-13
lines changed
Expand file tree Collapse file tree 2 files changed +41
-13
lines changed Original file line number Diff line number Diff line change 1+ name : devcontainer command
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ run_cmd :
7+ required : true
8+ type : string
9+ description : ' Command to run in the dev container'
10+
11+ jobs :
12+ devcontainer-command :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Login to GitHub Container Registry
22+ uses : docker/login-action@v3
23+ with :
24+ registry : ghcr.io
25+ username : ${{ github.repository_owner }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Run command in devcontainer
29+ uses :
devcontainers/[email protected] 30+ with :
31+ imageName : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-devcontainer
32+ cacheFrom : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-devcontainer
33+ push : always
34+ runCmd : ${{ inputs.run_cmd }}
Original file line number Diff line number Diff line change 11name : lint
22
3- on :
4- push :
5- branches : [ "main" ]
3+ on : # rebuild any PRs and main branch changes
64 pull_request :
7- branches : [ "main" ]
5+ push :
6+ branches :
7+ - main
88
99jobs :
1010 lint :
11- runs-on : ubuntu-latest
12-
13- steps :
14- - uses : actions/checkout@v4
15-
16- - name : Check formatting
17- run : |
18- find examples include tests -name '*.cpp' -o -name '*.h' |
19- xargs clang-format -style=file -i # --dry-run --Werror
11+ uses : ./.github/workflows/devcontainer-command.yml
12+ with :
13+ run_cmd : pre-commit run --all-files --show-diff-on-failure
You can’t perform that action at this time.
0 commit comments