Update dashboard.yml
This commit is contained in:
parent
e08585b4aa
commit
eeb6b73141
24
.github/workflows/dashboard.yml
vendored
24
.github/workflows/dashboard.yml
vendored
@ -22,12 +22,27 @@ jobs:
|
||||
run: |
|
||||
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
||||
echo "${{ secrets.ALI_PAT }}" | docker login registry.cn-shanghai.aliyuncs.com -u ${{ secrets.ALI_USER }} --password-stdin
|
||||
|
||||
- name: Build dasbboard image
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Code Test
|
||||
run: |
|
||||
go env
|
||||
go test -v ./...
|
||||
docker build -t nezha-dasbboard -f Dockerfile .
|
||||
go test -v ./...
|
||||
|
||||
- name: Build dasbboard image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm
|
||||
push: false
|
||||
tags: nezha-dasbboard
|
||||
|
||||
- name: Push dasbboard image
|
||||
run: |
|
||||
GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
|
||||
@ -39,6 +54,7 @@ jobs:
|
||||
docker tag nezha-dasbboard $ALI_IMAGE_NAME
|
||||
docker push $GHRC_IMAGE_NAME
|
||||
docker push $ALI_IMAGE_NAME
|
||||
|
||||
- name: Purge jsdelivr cache
|
||||
run: |
|
||||
curl -s https://purge.jsdelivr.net/gh/${{ github.repository_owner }}/nezha@master/script/install.sh
|
||||
|
Loading…
Reference in New Issue
Block a user