feat: add goreleaser docker image publish

This commit is contained in:
engigu
2024-01-27 22:11:27 +08:00
parent b81de54890
commit 86ffa87dcc
3 changed files with 71 additions and 25 deletions
+14 -11
View File
@@ -19,6 +19,8 @@ jobs:
env:
NODE_ENV: prod
CUSTOM_PROJ_NAME: Message-Nest
DOCKER_IMAGE_NAME: message-nest
steps:
- uses: actions/checkout@v3
@@ -26,22 +28,23 @@ jobs:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWD }}
- uses: actions/setup-go@v3
with:
go-version: '>=1.20.2'
cache: true
- name: Install npm dependencies
run: npm i
working-directory: web/
- name: Run npm build
run: export NODE_ENV=prod && npm run build
working-directory: web/
- name: Check build static
run: ls dist/ -la
working-directory: web/
- name: Git File Restore
run: git checkout .
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.