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:
|
env:
|
||||||
TEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/xiaomusic:${{ github.ref_name }}
|
TEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/xiaomusic:${{ github.ref_name }}
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-test-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
strategy:
|
strategy:
|
||||||
@ -44,15 +44,20 @@ jobs:
|
|||||||
push: false
|
push: false
|
||||||
load: true
|
load: true
|
||||||
tags: ${{ env.TAGNAME }}
|
tags: ${{ env.TAGNAME }}
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
|
||||||
|
|
||||||
- name: Test Docker image
|
- name: Test Docker image
|
||||||
run: docker run --rm ${{ env.TAGNAME }} -h
|
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
|
runs-on: ubuntu-latest
|
||||||
needs: build-and-test
|
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -60,16 +65,6 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
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
|
- name: Docker Hub Description
|
||||||
uses: peter-evans/dockerhub-description@v4
|
uses: peter-evans/dockerhub-description@v4
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user