👷 支持action自动化构建镜像

This commit is contained in:
chaos-zhu 2024-08-05 08:54:11 +08:00
parent f5f46aeda3
commit 9d5ab456e8
2 changed files with 35 additions and 1 deletions

34
.github/workflows/docker-build.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Docker Build and Push
on:
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-22.04
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: |
chaoszhu/easynode:${{ github.event.release.tag_name }}
chaoszhu/easynode:latest
- name: Clean up post-build
run: docker system prune -af

View File

@ -47,7 +47,7 @@ import { ref, getCurrentInstance, computed } from 'vue'
import { User } from '@element-plus/icons-vue'
import packageJson from '../../package.json'
const { proxy: { $router, $store, $message, $http } } = getCurrentInstance()
const { proxy: { $router, $store, $message } } = getCurrentInstance()
let visible = ref(false)
let currentVersion = ref(`v${ packageJson.version }`)