Skip to content

Merge pull request #223 from xuewenG/doc/update-readme-detail #7

Merge pull request #223 from xuewenG/doc/update-readme-detail

Merge pull request #223 from xuewenG/doc/update-readme-detail #7

Workflow file for this run

name: Build And Upload Image For Dev
on:
push:
branches:
- dev
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract Version
run: |
BUILD_TIME=$(TZ='Asia/Shanghai' date +'%Y%m%d%H%M')
COMMIT_ID=${GITHUB_SHA:0:7}
VERSION=dev.$BUILD_TIME.$COMMIT_ID
echo VERSION=$VERSION >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
push: true
context: .
platforms: |
linux/amd64
linux/arm64
tags: |
${{ secrets.DOCKER_USER_NAME }}/moments:dev
${{ secrets.DOCKER_USER_NAME }}/moments:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}