Skip to content

Commit 1b0403b

Browse files
committed
ci test
1 parent ca0cfca commit 1b0403b

2 files changed

Lines changed: 29 additions & 14 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Prepare zenv native container
2+
description: Prepare a GitHub native job container to run zenv project commands.
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Configure zenv environment
7+
shell: bash
8+
run: |
9+
set -euo pipefail
10+
11+
project_root="${GITHUB_WORKSPACE:-${PWD}}"
12+
git config --global --add safe.directory "${project_root}"
13+
14+
source "${ZEPHYR_WS}/.venv/bin/activate"
15+
16+
echo "ZENV_PROJECT_ROOT=${project_root}" >> "${GITHUB_ENV}"
17+
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> "${GITHUB_ENV}"
18+
echo "${VIRTUAL_ENV}/bin" >> "${GITHUB_PATH}"

.github/workflows/ci.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -232,26 +232,23 @@ jobs:
232232
name: Code formatting
233233
runs-on: ubuntu-latest
234234
needs: devcontainer
235+
container:
236+
image: ${{ needs.devcontainer.outputs.image_name }}:${{ needs.devcontainer.outputs.image_tag }}
237+
credentials:
238+
username: ${{ github.repository_owner }}
239+
password: ${{ secrets.GITHUB_TOKEN }}
240+
options: --user root
241+
env:
242+
HOME: /home/ubuntu
235243
steps:
236244
- name: Pull the repository
237245
uses: actions/checkout@v6
238246
with:
239247
fetch-depth: 0
240-
- name: Login to GitHub Container Registry
241-
uses: docker/login-action@v4
242-
with:
243-
registry: ghcr.io
244-
username: ${{ github.repository_owner }}
245-
password: ${{ secrets.GITHUB_TOKEN }}
248+
- name: Prepare zenv
249+
uses: ./.github/actions/prepare-zenv-native
246250
- name: Check formatting
247-
uses: devcontainers/ci@v0.3
248-
with:
249-
configFile: .devcontainer/ci/devcontainer.json
250-
push: never
251-
runCmd: |
252-
make format
253-
env:
254-
OPENDECK_DEVCONTAINER_IMAGE: ${{ needs.devcontainer.outputs.image_name }}:${{ needs.devcontainer.outputs.image_tag }}
251+
run: make format
255252
lint-targets:
256253
name: Lint targets
257254
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)