mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-07 23:32:27 +08:00
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: release image & asset
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
package:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
with:
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Inspect builder
|
|
run: |
|
|
echo "Name: ${{ steps.buildx.outputs.name }}"
|
|
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
|
|
echo "Status: ${{ steps.buildx.outputs.status }}"
|
|
echo "Flags: ${{ steps.buildx.outputs.flags }}"
|
|
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
|
|
|
|
- name: Docker tag
|
|
id: vars
|
|
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
- name: Build and push eiblog
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
file: ./build/package/eiblog.Dockerfile
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
push: true
|
|
tags: |
|
|
deepzz0/eiblog:${{ steps.vars.outputs.tag }}
|
|
|
|
- name: Build and push backup
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
file: ./build/package/backup.Dockerfile
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
push: true
|
|
tags: |
|
|
deepzz0/backup:${{ steps.vars.outputs.tag }}
|
|
|
|
- name: Package tar
|
|
env:
|
|
GOPROXY: https://goproxy.io,direct
|
|
run: scripts/dist_tar.sh ${{ steps.vars.outputs.tag }}
|
|
- name: Release push
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
files: |
|
|
*.tar.gz
|