Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix: Dockerfile CMD #313

fix: Dockerfile CMD

fix: Dockerfile CMD #313

Workflow file for this run

name: CI to Docker Hub
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for tags
push:
branches: [ main ]
tags:
- "v*"
- "beta-v*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: decide docker tags
id: dockertag
run: |
if [[ $REF == "refs/tags/v"* ]]
then
echo "tags=$BASE_TAG:latest, $BASE_TAG:beta, $BASE_TAG:${REF#refs/tags/}" >> $GITHUB_ENV
elif [[ $REF == "refs/tags/beta-v"* ]]
then
echo "tags=$BASE_TAG:beta, $BASE_TAG:${REF#refs/tags/}" >> $GITHUB_ENV
else
echo "tags=$BASE_TAG:dev" >> $GITHUB_ENV
fi
env:
REF: ${{ github.ref }}
BASE_TAG: ${{ secrets.DOCKER_HUB_USERNAME }}/kitchenowl
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64 #,linux/arm/v7 #,linux/386,linux/arm/v6
push: true
tags: ${{ env.tags }}
# cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/kitchenowl:buildcache
# cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/kitchenowl:buildcache,mode=max
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}