Skip to content

dev hot

dev hot #3

Workflow file for this run

name: build
on:
workflow_dispatch:
inputs:
branch:
type: choice
options:
- dev
- master
- test
default: "dev"
required: true
push:
branches:
- dev-hot
env:
platform: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
defaults:
run:
shell: bash
working-directory: ./
jobs:
# cook:
# uses: ./.github/workflows/cook.yml
docker:
# needs: cook
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- uses: mikefarah/yq@master
id: get_version
with:
cmd: "yq -p toml -oy '.project.version' pyproject.toml"
- if: ${{ inputs.branch == 'master' }}
name: Build Docker From master
run: |
echo docker buildx build --push --platform "${{ env.platform }}" \
-t ${{ secrets.DOCKER_USER }}/genpac \
-t ${{ secrets.DOCKER_USER }}/genpac:${{steps.get_version.outputs.result}} \
.
- if: ${{ inputs.branch == 'dev' }}
name: Build Docker From dev
run: |
echo docker buildx build --push --platform "${{ env.platform }}" \
-t ${{ secrets.DOCKER_USER }}/genpac:dev .