Skip to content

Commit

Permalink
feat: modify release action
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghe-fit2cloud committed Jan 19, 2024
1 parent 5933a55 commit 8dfa1ec
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 82 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/dev-workflow.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/release-workflow.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Image

on:
push:
tags:
- v*

env:
DOCKERHUB_REPO: 1panel/kubepi

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.DOCKERHUB_REPO }}:latest
${{ env.DOCKERHUB_REPO }}:${{ steps.get_version.outputs.VERSION }}

0 comments on commit 8dfa1ec

Please sign in to comment.