File tree Expand file tree Collapse file tree 5 files changed +30
-20
lines changed
Expand file tree Collapse file tree 5 files changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ permissions:
3737
3838jobs :
3939 docker-build :
40- name : build- ${{ inputs.platform }}
40+ name : Build ${{ inputs.platform }}
4141 outputs :
4242 digest : ${{ steps.docker_platform.outputs.digest }}
4343 runs-on : ${{ inputs.runs-on }}
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ permissions:
99 attestations : write
1010
1111jobs :
12- docker-amd64 :
12+ build :
13+ name : Build Test
1314 strategy :
1415 fail-fast : false
1516 matrix :
Original file line number Diff line number Diff line change 1- name : Build Release
1+ name : Build CI
22on :
33 push :
44 # build and push anytime commits are pushed/merged
55 branches :
66 - main
77 schedule :
88 # build and push weekly
9- - cron : 0 5 * * 5
9+ - cron : 0 0 * * 5
1010 workflow_dispatch : # allow manual triggering
1111
1212permissions :
@@ -16,7 +16,8 @@ permissions:
1616 attestations : write
1717
1818jobs :
19- docker-platforms :
19+ build :
20+ name : Build Docker
2021 strategy :
2122 fail-fast : false
2223 matrix :
3738 uses : ./.github/workflows/docker_manifest.yml
3839 with :
3940 port : ${{ matrix.port }}
40- secrets : inherit
41+ secrets : inherit
42+
43+ clean :
44+ name : Cleanup GitHub Packages
45+ needs : build
46+ runs-on : ubuntu-latest
47+ steps :
48+ - name : Cleanup GitHub packages container
49+ uses : dataaxiom/ghcr-cleanup-action@v1
50+ with :
51+ delete-ghost-images : true
52+ delete-untagged : true
53+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -29,16 +29,16 @@ ARG WORKSPACE_REPO_REF="main"
2929RUN git config --global --add safe.directory /workspace \
3030 && git clone "${WORKSPACE_REPO}" /workspace \
3131 && git remote add upstream "${WORKSPACE_REPO_UPSTREAM}" \
32- && git fetch origin --tags \
33- && git fetch upstream --tags \
32+ && git fetch upstream --tags --prune --force \
33+ && git fetch origin --tags --prune --force \
3434 && git reset --hard "${WORKSPACE_REPO_REMOTE}/${WORKSPACE_REPO_REF}" \
3535 && git repack -d
3636
3737ARG WORKSPACE_BUILD_REMOTE="origin"
3838ARG WORKSPACE_BUILD_REF="main"
3939RUN echo "Hard reset repository to: ${WORKSPACE_REPO_REMOTE}/${WORKSPACE_REPO_REF}" \
40- && git fetch origin --no-recurse-submodules --tags --prune \
41- && git fetch upstream --no-recurse-submodules --tags --prune \
40+ && git fetch upstream --tags --prune --force \
41+ && git fetch origin --tags --prune --force \
4242 && git fetch "${WORKSPACE_BUILD_REMOTE}" "${WORKSPACE_BUILD_REF}" \
4343 && git reset --hard FETCH_HEAD \
4444 && git repack -d \
Original file line number Diff line number Diff line change @@ -15,14 +15,10 @@ inputs:
1515 default : main
1616 required : false
1717 port :
18- description : The CircuitPython platform to build (espressif, nrf )
18+ description : The CircuitPython platform to build (espressif, nordic )
1919 required : true
20- target :
21- description : The CircuitPython run target (default is 'build')
22- required : false
23- default : build
2420 board :
25- description : The CircuitPython board to build (if target is release, specify multiple boards)
21+ description : The CircuitPython board to build
2622 default : " "
2723 required : false
2824
@@ -31,17 +27,17 @@ runs:
3127 steps :
3228 - id : build_circuitpython
3329 run : |
30+ sudo rm -rf $GITHUB_WORKSPACE/bin
31+ sudo mkdir -p $GITHUB_WORKSPACE/bin
3432 docker run --rm \
3533 --env GITHUB_ACTIONS \
3634 --env REPO_REMOTE \
3735 --env REPO_REF \
38- --env CPY_TARGET \
39- --env CPY_BOARD \
36+ --env BOARD \
4037 -v $GITHUB_WORKSPACE/bin:/workspace/bin \
4138 ghcr.io/fobe-projects/action-circuitpython-builder:main-${{ inputs.port }}
4239 shell : bash
4340 env :
4441 REPO_REMOTE : ${{ inputs.repo_remote }}
4542 REPO_REF : ${{ inputs.repo_ref }}
46- CPY_TARGET : ${{ inputs.target }}
47- CPY_BOARD : ${{ inputs.board }}
43+ BOARD : ${{ inputs.board }}
You can’t perform that action at this time.
0 commit comments