Skip to content

Fix docker file after moving requirements txt #28

Fix docker file after moving requirements txt

Fix docker file after moving requirements txt #28

Workflow file for this run

name: Build Docker Image
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'README_zh.md'
- 'Makefile'
- 'ruff.toml'
workflow_dispatch:
env:
GHCR_REPO: ghcr.io/stdioa/beancount-bot
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get short SHA
uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Build and push to GHCR
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
file: docker/Dockerfile
push: true
tags: |
${{ env.GHCR_REPO }}:latest
${{ env.GHCR_REPO }}:${{ env.SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build for arm/v7 and push to GHCR
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/arm/v7
file: docker/Dockerfile-armv7
push: true
tags: |
${{ env.GHCR_REPO }}:latest
${{ env.GHCR_REPO }}:${{ env.SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max