@@ -15,12 +15,23 @@ jobs:
1515 runs-on : ubuntu-latest
1616
1717 steps :
18- - uses : actions/checkout@v3
18+ - uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+ submodules : recursive
22+
23+ - name : Use Latest Corepack
24+ run : |
25+ echo "Before: corepack version => $(corepack --version || echo 'not installed')"
26+ npm install -g corepack@latest
27+ echo "After : corepack version => $(corepack --version)"
28+ corepack enable
29+ pnpm --version
1930
2031 - name : Setup node.js
21- uses : actions/setup-node@v3
32+ uses : actions/setup-node@v4
2233 with :
23- cache : " yarn "
34+ cache : " pnpm "
2435 node-version-file : " .nvmrc"
2536
2637 - name : Configure access to private npm packages
@@ -29,10 +40,41 @@ jobs:
2940 # prepare script runs before publish, and it needs husky
3041 - name : Install dependencies
3142 run : |
32- yarn install --frozen-lockfile
43+ pnpm install --frozen-lockfile
3344
3445 - name : Semantic Release
3546 uses : cycjimmy/semantic-release-action@v3
3647 env :
3748 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3849 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
50+
51+ - name : Docker meta
52+ id : meta
53+ uses : docker/metadata-action@v5
54+ with :
55+ flavor : |
56+ latest=${{ github.ref_name == 'main' }}
57+ images : |
58+ ghcr.io/gearbox-protocol/periphery-v3
59+ tags : |
60+ type=ref,event=branch
61+ type=ref,event=tag
62+
63+ - name : Set up Docker Buildx
64+ uses : docker/setup-buildx-action@v3
65+
66+ - name : Login to GitHub Container Registry
67+ uses : docker/login-action@v3
68+ with :
69+ registry : ghcr.io
70+ username : ${{ github.actor }}
71+ password : ${{ github.token }}
72+
73+ - name : Build and push docker image
74+ uses : docker/build-push-action@v5
75+ with :
76+ context : .
77+ platforms : linux/amd64 # ,linux/arm64
78+ push : true
79+ tags : ${{ steps.meta.outputs.tags }}
80+ labels : ${{ steps.meta.outputs.labels }}
0 commit comments