chore: 基础镜像更换为node:20.18.0 #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build docker | ||
on: | ||
push: | ||
tags-ignore: | ||
- * | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to coding registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: bangbang93-docker.pkg.coding.net | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Extract Git Tag | ||
run: echo "GIT_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
env: | ||
IMAGE_TAG: ${{ env.GIT_BRANCH }} | ||
IMAGE_NAME: bangbang93-docker.pkg.coding.net/registry/bangbang93/freyja | ||
with: | ||
push: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
tags: | | ||
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} |