Skip to content

Commit 39880f8

Browse files
committed
Add a workflow to publish the builder docker umage
1 parent 798d34f commit 39880f8

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/docker.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Docker
2+
3+
permissions:
4+
contents: read
5+
packages: write
6+
7+
on:
8+
schedule:
9+
- cron: "0 0 * * *"
10+
workflow_dispatch:
11+
inputs:
12+
commit_sha:
13+
description: Git commit sha, on which, to run this workflow
14+
15+
jobs:
16+
build-and-push:
17+
name: Docker - build-and-push-image
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
22+
with:
23+
ref: ${{ github.event.inputs.commit_sha }}
24+
25+
- name: Set up docker buildx
26+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
27+
28+
- name: Log in to github's container registry
29+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Build and push the docker image
36+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
37+
with:
38+
context: .
39+
file: tools/docker/dev/Dockerfile
40+
platforms: linux/amd64,linux/arm64
41+
push: true
42+
tags: |
43+
ghcr.io/build-trust/autonomy-builder:latest
44+
ghcr.io/build-trust/autonomy-builder:${{ github.sha }}

0 commit comments

Comments
 (0)