mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
update github actions
This commit is contained in:
@@ -9,35 +9,44 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
- name: Docker meta
|
||||||
name: Set up docker tag
|
id: meta
|
||||||
id: vars
|
uses: docker/metadata-action@v4
|
||||||
run: echo ::set-output name=RELEASE_TAG::${GITHUB_REF/refs\/tags\/v/}
|
with:
|
||||||
-
|
images: |
|
||||||
name: Set up QEMU
|
${{ secrets.DOCKER_USERNAME }}/ezbookkeeping
|
||||||
uses: docker/setup-qemu-action@v1
|
tags: |
|
||||||
-
|
type=semver,pattern={{version}}
|
||||||
name: Set up Docker Buildx
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
uses: docker/setup-buildx-action@v1
|
type=raw,value=latest
|
||||||
-
|
|
||||||
name: Login to DockerHub
|
- name: Set up QEMU
|
||||||
uses: docker/login-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
|
||||||
name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v6
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64/v8
|
||||||
|
linux/arm/v7
|
||||||
|
linux/arm/v6
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
build-args: |
|
||||||
RELEASE_BUILD=1
|
RELEASE_BUILD=1
|
||||||
tags: |
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/ezbookkeeping:${{ steps.vars.outputs.RELEASE_TAG }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/ezbookkeeping:latest
|
|
||||||
@@ -9,33 +9,41 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
- name: Docker meta
|
||||||
name: Set up docker tag
|
id: meta
|
||||||
id: vars
|
uses: docker/metadata-action@v4
|
||||||
run: echo ::set-output name=BUILD_DATE::$(date '+%Y%m%d')
|
with:
|
||||||
-
|
images: |
|
||||||
name: Set up QEMU
|
${{ secrets.DOCKER_USERNAME }}/ezbookkeeping
|
||||||
uses: docker/setup-qemu-action@v1
|
tags: |
|
||||||
-
|
type=raw,value=SNAPSHOT-{{date 'YYYYMMDD'}}
|
||||||
name: Set up Docker Buildx
|
type=raw,value=latest-snapshot
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
-
|
- name: Set up QEMU
|
||||||
name: Login to DockerHub
|
uses: docker/setup-qemu-action@v2
|
||||||
uses: docker/login-action@v1
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
|
||||||
name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v6
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64/v8
|
||||||
|
linux/arm/v7
|
||||||
|
linux/arm/v6
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/ezbookkeeping:SNAPSHOT-${{ steps.vars.outputs.BUILD_DATE }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/ezbookkeeping:latest-snapshot
|
|
||||||
Reference in New Issue
Block a user