1- name : DEV - Build and Push to GHCR
1+ name : Coordinate - Build and Push to GHCR
22
33on :
44 push :
3030 - name : Checkout Code
3131 uses : actions/checkout@v4
3232
33+ - name : Cache CMake build
34+ uses : actions/cache@v3
35+ with :
36+ path : |
37+ build
38+ ~/.cache
39+ key : ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp', '**/*.h') }}
40+ restore-keys : |
41+ ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}-
42+ ${{ runner.os }}-cmake-
43+
44+ - name : Cache apt packages
45+ uses : actions/cache@v3
46+ with :
47+ path : /var/cache/apt/archives
48+ key : ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/*.yml') }}
49+ restore-keys : |
50+ ${{ runner.os }}-apt-
51+
3352 - name : Create new tag (semantic versioning)
3453 id : tag
3554 uses :
mathieudutour/[email protected] 6786 - name : Verify build artifacts
6887 run : ls -la build/bin/
6988
89+ - name : Set up Docker Buildx
90+ uses : docker/setup-buildx-action@v3
91+
92+ - name : Fix Docker socket permissions
93+ run : |
94+ sudo chmod 666 /var/run/docker.sock
95+
7096 - name : Log in to GitHub Container Registry
7197 uses : docker/login-action@v3
7298 with :
90116 context : .
91117 push : true
92118 tags : ${{ steps.meta.outputs.tags }}
93- labels : ${{ steps.meta.outputs.labels }}
119+ labels : ${{ steps.meta.outputs.labels }}
120+ cache-from : type=registry,ref=ghcr.io/${{ env.IMAGE_NAME }}:buildcache
121+ cache-to : type=registry,ref=ghcr.io/${{ env.IMAGE_NAME }}:buildcache,mode=max
0 commit comments