mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-05-05 08:54:27 -04:00
run gha as root in docker
using the opam user wouldn't work for actions like checkout
This commit is contained in:
parent
f7e11753e2
commit
4e80493e4a
3 changed files with 23 additions and 11 deletions
8
.github/workflows/format.yml
vendored
8
.github/workflows/format.yml
vendored
|
|
@ -10,9 +10,13 @@ jobs:
|
||||||
format:
|
format:
|
||||||
name: format
|
name: format
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/ocaml-tracing/ocaml-opentelemetry/ci-4.14:latest
|
container:
|
||||||
|
image: ghcr.io/ocaml-tracing/ocaml-opentelemetry/ci-4.14:latest
|
||||||
|
options: --user root
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- run: opam exec -- make format-check
|
- run: chown -R opam:opam .
|
||||||
|
|
||||||
|
- run: su opam -c "opam exec -- make format-check"
|
||||||
|
|
|
||||||
12
.github/workflows/gh-pages.yml
vendored
12
.github/workflows/gh-pages.yml
vendored
|
|
@ -8,23 +8,27 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/ocaml-tracing/ocaml-opentelemetry/ci-5.4:latest
|
container:
|
||||||
|
image: ghcr.io/ocaml-tracing/ocaml-opentelemetry/ci-5.4:latest
|
||||||
|
options: --user root
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- run: chown -R opam:opam .
|
||||||
|
|
||||||
- name: Install local packages
|
- name: Install local packages
|
||||||
run: opam exec -- dune build @install && opam exec -- dune install
|
run: su opam -c "opam exec -- dune build @install && opam exec -- dune install"
|
||||||
|
|
||||||
- name: Build documentation
|
- name: Build documentation
|
||||||
run: |
|
run: |
|
||||||
opam exec -- odig odoc --cache-dir=_doc/ \
|
su opam -c "opam exec -- odig odoc --cache-dir=_doc/ \
|
||||||
opentelemetry opentelemetry-client opentelemetry-lwt \
|
opentelemetry opentelemetry-client opentelemetry-lwt \
|
||||||
opentelemetry-cohttp-lwt opentelemetry-client-ocurl \
|
opentelemetry-cohttp-lwt opentelemetry-client-ocurl \
|
||||||
opentelemetry-client-ocurl-lwt opentelemetry-client-cohttp-lwt \
|
opentelemetry-client-ocurl-lwt opentelemetry-client-cohttp-lwt \
|
||||||
opentelemetry-client-cohttp-eio opentelemetry-logs
|
opentelemetry-client-cohttp-eio opentelemetry-logs"
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
|
|
||||||
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
|
|
@ -23,7 +23,9 @@ jobs:
|
||||||
eio: true
|
eio: true
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ${{ matrix.container }}
|
container:
|
||||||
|
image: ${{ matrix.container }}
|
||||||
|
options: --user root
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -31,18 +33,20 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- run: chown -R opam:opam .
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: opam exec -- dune build @install -p opentelemetry,opentelemetry-client,opentelemetry-lwt,opentelemetry-cohttp-lwt,opentelemetry-client-ocurl,opentelemetry-client-ocurl-lwt,opentelemetry-client-cohttp-lwt,opentelemetry-logs
|
run: su opam -c "opam exec -- dune build @install -p opentelemetry,opentelemetry-client,opentelemetry-lwt,opentelemetry-cohttp-lwt,opentelemetry-client-ocurl,opentelemetry-client-ocurl-lwt,opentelemetry-client-cohttp-lwt,opentelemetry-logs"
|
||||||
|
|
||||||
- name: Build eio packages
|
- name: Build eio packages
|
||||||
if: ${{ matrix.eio }}
|
if: ${{ matrix.eio }}
|
||||||
run: opam exec -- dune build @install -p opentelemetry-client-cohttp-eio
|
run: su opam -c "opam exec -- dune build @install -p opentelemetry-client-cohttp-eio"
|
||||||
|
|
||||||
- name: Lint (protoc check)
|
- name: Lint (protoc check)
|
||||||
run: opam exec -- dune build @lint
|
run: su opam -c "opam exec -- dune build @lint"
|
||||||
|
|
||||||
- name: Check no generated files changed
|
- name: Check no generated files changed
|
||||||
run: git diff --exit-code
|
run: git diff --exit-code
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: opam exec -- dune build @runtest
|
run: su opam -c "opam exec -- dune build @runtest"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue