-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (38 loc) · 1.14 KB
/
docker.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
name: 🐳 Docker
on:
schedule:
- cron: "0 */4 * * *"
jobs:
build-docker:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Env
run: |
echo "GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TIMESTAMP=$(git log -1 --pretty=format:'%cI')" >> $GITHUB_ENV
# https://github.com/docker/setup-qemu-action
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: "--debug"
- name: Docker Build
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
file: docker/Dockerfile
context: .
platforms: linux/amd64
build-args: |
git_sha=${{ env.GIT_SHA }}
git_timestamp=${{ env.GIT_TIMESTAMP }}
push: false
tags: |
${{ github.repository_owner }}/homestar:latest