Update ci.yml
This commit is contained in:
parent
e48c6456fc
commit
d7fd7c43dc
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@ -7,7 +7,7 @@ on:
|
||||
env:
|
||||
TEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/xiaomusic:${{ github.ref_name }}
|
||||
jobs:
|
||||
build-and-test:
|
||||
build-test-publish:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'pull_request'
|
||||
strategy:
|
||||
@ -44,15 +44,20 @@ jobs:
|
||||
push: false
|
||||
load: true
|
||||
tags: ${{ env.TAGNAME }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
|
||||
- name: Test Docker image
|
||||
run: docker run --rm ${{ env.TAGNAME }} -h
|
||||
|
||||
publish:
|
||||
- name: Publish to Docker Hub
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: ${{ matrix.platform }}
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ env.TEST_TAG }}
|
||||
|
||||
publish-readme:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-and-test
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
@ -60,16 +65,6 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Publish to Docker Hub
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ env.TEST_TAG }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache-new
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
|
||||
- name: Docker Hub Description
|
||||
uses: peter-evans/dockerhub-description@v4
|
||||
with:
|
||||
|
Loading…
Reference in New Issue
Block a user