You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- name: build docker image
- on:
- push:
- branches:
- - main
- workflow_dispatch:
- inputs:
- logLevel:
- description: "log level"
- required: true
- default: "warning"
- tags:
- description: "test scenario tags"
-
- jobs:
- buildx:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Get current date
- id: date
- run: echo "::set-output name=today::$(date +'%Y-%m-%d_%H-%M')"
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v2
- - name: Set up Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v2
- - name: Available platforms
- run: echo ${{ steps.buildx.outputs.platforms }}
- - name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: Build and push
- uses: docker/build-push-action@v2
- with:
- context: .
- file: ./Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: ${{ github.event_name != 'pull_request' }}
- tags: |
- huatuo/huatuo-bamai:latest
- # huatuo/huatuo-bamai:${{ steps.date.outputs.today }}
|