style: 格式化代码 #4
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: Client Docker Image | |
on: | |
push: | |
branches: | |
- 'master' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 8 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: https://${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build And Push Docker Image | |
shell: bash | |
run: | | |
docker buildx create --use | |
docker buildx inspect --bootstrap | |
docker buildx build --platform linux/amd64 \ | |
--tag ${{ secrets.REGISTRY }}/client:${{ github.sha }} \ | |
--tag ${{ secrets.REGISTRY }}/client:latest \ | |
--push . |