File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and release
2+
3+ env :
4+ CI : false
5+ IMAGE_TAG : latest
6+
7+ on :
8+ push :
9+ branches :
10+ - main
11+
12+ jobs :
13+ build-and-release :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v2
23+
24+ - name : Determine Docker image tag
25+ id : docker_tag
26+ run : |
27+ IMAGE_NAME="rav3nh01m/micropython_esp-idf:$IMAGE_TAG"
28+
29+ echo "Checking for image: $IMAGE_NAME"
30+
31+ if docker pull "$IMAGE_NAME"; then
32+ echo "Using tag: $IMAGE_TAG"
33+ else
34+ echo "Tag not found. Falling back to latest."
35+ IMAGE_TAG="latest"
36+ docker pull "rav3nh01m/micropython_esp-idf:latest"
37+ fi
38+
39+ echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
40+
41+ - name : Get runner UID and GID
42+ id : runner_ids
43+ run : |
44+ echo "uid=$(id -u)" >> "$GITHUB_OUTPUT"
45+ echo "gid=$(id -g)" >> "$GITHUB_OUTPUT"
46+
47+ - name : Run MicroPython build container
48+ run : |
49+ docker run --rm \
50+ -e HOST_UID=${{ steps.runner_ids.outputs.uid }} \
51+ -e HOST_GID=${{ steps.runner_ids.outputs.gid }} \
52+ -e PROJECT_DIR=/project \
53+ -e PORT=${{ vars.PORT }} \
54+ -e BOARD=${{ vars.BOARD }} \
55+ -e FREEZE_BOOT=${{ vars.FREEZE_BOOT }} \
56+ -e FREEZE_MAIN=${{ vars.FREEZE_MAIN }} \
57+ -v "$PWD:/project" \
58+ rav3nh01m/micropython:${{ steps.docker_tag.outputs.image_tag }}
You can’t perform that action at this time.
0 commit comments