2525 steps :
2626 - uses : actions/checkout@v3
2727 - uses : actions/cache@v3
28+ env :
29+ cache-name : npm-cache
2830 with :
29- path : " **/node_modules"
30- key : ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
31+ path : " web/node_modules"
32+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
33+ restore-keys : |
34+ ${{ runner.os }}-build-${{ env.cache-name }}-
3135
3236 - name : Set release version
3337 run : |
5357 with :
5458 images : |
5559 x1unix/go-playground
56- ghcr.io/x1unix/go-playground /go-playground
60+ ghcr.io/${{ github.repository }} /go-playground
5761 tags : |
5862 type=semver,pattern={{version}}
5963 type=semver,pattern={{major}}.{{minor}}
@@ -65,14 +69,13 @@ jobs:
6569 id : buildx
6670 uses : docker/setup-buildx-action@v2
6771
68- - name : Build frontend
69- uses : actions/setup-node@v3
72+ - uses : actions/setup-node@v3
7073 with :
7174 node-version : ' lts/gallium'
72- cache : ' yarn'
73- cache-dependency-path : " ${{ github.workspace }}/web"
75+
7476 - run : |
75- yarn --cwd='${{ github.workspace }}/work' install --silent && yarn --cwd='${{ github.workspace }}/work' build
77+ yarn install --silent && yarn build
78+ working-directory: ./web
7679 env:
7780 NODE_ENV: "production"
7881 REACT_APP_VERSION: "${{ env.RELEASE_VERSION }}"
9194 build-args : |
9295 APP_VERSION=${{ env.RELEASE_VERSION }}
9396 push : true
97+
9498 - name : Print image digest
9599 run : echo ${{ steps.docker_build.outputs.digest }}
0 commit comments