Fix: [CI] Build Docker Image

remotes/origin/HEAD
MengYX 4 years ago
parent 3a5afeb8a6
commit 85fdbff00d
No known key found for this signature in database
GPG Key ID: E63F9C7303E8F604

@ -0,0 +1,30 @@
name: Publish Docker image
on:
release:
types: [ published ]
jobs:
- name: Download release content
run: |
wget -o modern.tar.gz "https://github.com/ix64/unlock-music/releases/download/${{ GITHUB_REF }}/modern.tar.gz"
mkdir ./dist
tar zxvf modern.tar.gz -C ./dist
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker and push (on modern)
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/386
push: true
tags: |
ix64/unlock-music:latest
ix64/unlock-music:${{ GITHUB_REF }}

@ -132,23 +132,3 @@ jobs:
asset_path: ./sha256sum.txt
asset_name: sha256sum.txt
asset_content_type: text/plain
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker and push (on modern)
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/386
push: true
tags: |
ix64/unlock-music:latest
ix64/unlock-music:${{ GITHUB_REF#refs/tags/ }}

Loading…
Cancel
Save