-
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (48 loc) · 1.68 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
47
48
49
50
51
52
53
54
55
56
57
58
name: Docker Build
on: [ push, pull_request ]
env:
DOCKER_IMAGE: insprill/intellectual
DOCKER_PLATFORMS: linux/amd64,linux/arm64
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup act
run: "sudo chown runner:docker /var/run/docker.sock"
if: ${{ env.ACT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Hub Description
if: false
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ env.DOCKER_IMAGE }}
enable-url-completion: true
- name: Set Environment Variables
run: |
echo "IN_IS_GIT=true" >> .env
echo "IN_GIT_HASH=ced8d640838231474f9a1630bd5790ee96bfa898" >> .env
echo "IN_GIT_DIRTY=false" >> .env
echo "IN_GIT_TAG=v0.8.0" >> .env
echo "IN_GIT_TAGGED=true" >> .env
echo "IN_GIT_REMOTE_URL=$(git remote get-url origin)" >> .env
- name: Build & Push
uses: docker/build-push-action@v5
with:
context: . # Required for running with act
push: true
tags: insprill/intellectual:latest
platforms: ${{ env.DOCKER_PLATFORMS }}
cache-from: type=gha
cache-to: type=gha,mode=max