Skip to content

优化pixiu容器启动进程 (#569) #3

优化pixiu容器启动进程 (#569)

优化pixiu容器启动进程 (#569) #3

name: Publish webshell image
on:
push:
branches:
- "master"
paths:
- 'docker/Dockerfile-toolbox'
- 'Makefile'
env:
K8S_VERSION: v1.23.6 # the same as Makefile
HELM_VERSION: v3.7.1 # the same as Makefile
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get short commit hash
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login in dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_NAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push webshell image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile-toolbox
platforms: linux/amd64,linux/arm64
build-args: |
K8S_VERSION=${{ env.K8S_VERSION }}
HELM_VERSION=${{ env.HELM_VERSION }}
push: true
tags: |
${{ secrets.DOCKER_NAME }}/pixiu-webshell:latest
${{ secrets.DOCKER_NAME }}/pixiu-webshell:v0.1
${{ secrets.DOCKER_NAME }}/pixiu-webshell:${{ env.COMMIT_HASH }}