-
Notifications
You must be signed in to change notification settings - Fork 77
59 lines (50 loc) · 1.74 KB
/
docker_edge.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
59
name: Docker Edge
on:
workflow_dispatch: {}
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
jobs:
build:
if: ${{ github.repository == 'warpstreamlabs/bento' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Free up some disk space on ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Install Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./
file: ./resources/docker/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
push: true
tags: warpstreamlabs/bento:edge,ghcr.io/${{ github.repository_owner }}/bento:edge
- name: Build and push CGO
uses: docker/build-push-action@v6
with:
context: ./
file: ./resources/docker/Dockerfile.cgo
push: true
tags: warpstreamlabs/bento:edge-cgo,ghcr.io/${{ github.repository_owner }}/bento:edge-cgo