-
Notifications
You must be signed in to change notification settings - Fork 90
75 lines (64 loc) · 2.02 KB
/
docker.yaml
File metadata and controls
75 lines (64 loc) · 2.02 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build Docker Images
on:
schedule:
- cron: '0 0 * * *' # Run Daily
workflow_dispatch:
env:
DOCKER_ORG: cormorack
GITHUB_SHA: ${{ github.sha }}
jobs:
docker-build:
name: ${{ matrix.image_name }}-build
runs-on: ubuntu-22.04
strategy:
matrix:
image_name: ["minioci"]
steps:
- name: Checkout
uses: actions/checkout@v6
- run: df -h
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
android: true
dotnet: true
haskell: true
tool-cache: true
swap-storage: true
- run: df -h
- name: Docker prune
run: |
docker buildx prune -af --filter until=24h || true # keep super-recent cache
docker system prune -af || true
- name: Retrieve test data
if: matrix.image_name == 'http'
uses: ./.github/actions/gdrive-rclone
env:
GOOGLE_SERVICE_JSON: ${{ secrets.GOOGLE_SERVICE_JSON }}
ROOT_FOLDER_ID: ${{ secrets.TEST_DATA_FOLDER_ID }}
- name: Set Docker Image Spec
run: |
DATE_TAG="$( date -u '+%Y.%m.%d' )"
IMAGE_SPEC="${{ env.DOCKER_ORG }}/${{ matrix.image_name }}"
echo "IMAGE_SPEC=${IMAGE_SPEC}" >> $GITHUB_ENV
echo "DATE_TAG=${DATE_TAG}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
id: docker_build_push
uses: docker/build-push-action@v7
with:
context: ./
file: ./.ci_helpers/docker/${{ matrix.image_name }}.dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.IMAGE_SPEC }}:${{ env.DATE_TAG }}
${{ env.IMAGE_SPEC }}:latest