Files
ShellCrash/.github/workflows/docker.yaml

54 lines
1.2 KiB
YAML

name: Build Docker image for ShellCrash
on:
push:
branches:
- master
paths:
- 'version'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Read version
id: read_version
run: echo "VERSION=$(cat 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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push (multi-arch)
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: |
linux/386
linux/amd64
linux/arm64
linux/arm/v7
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/shellcrash:latest
${{ secrets.DOCKERHUB_USERNAME }}/shellcrash:${{ env.VERSION }}