-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (43 loc) · 1.3 KB
/
docker-build-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Docker Image Build
on:
push:
branches: [ "mane" ]
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref_name == 'mane' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
with:
platforms: linux/arm64
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up ENV
id: env
run: |
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
echo "BUILD_COMMIT=$GITHUB_SHA" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Izzy-Moonbot/Dockerfile
push: true
tags: ghcr.io/manechat/izzy-moonbot:latest
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_COMMIT=${{ env.BUILD_COMMIT }}
platforms: linux/arm64,linux/amd64
provenance: false