-
Notifications
You must be signed in to change notification settings - Fork 307
49 lines (42 loc) · 1.16 KB
/
ci-image.yml
File metadata and controls
49 lines (42 loc) · 1.16 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
name: Build CI Image
on:
push:
branches: [main]
paths:
- 'deploy/docker/Dockerfile.ci'
- 'mise.toml'
- 'tasks/**'
- '.github/workflows/ci-image.yml'
workflow_dispatch:
env:
REGISTRY: ghcr.io
CI_IMAGE: ghcr.io/nvidia/openshell/ci
permissions:
contents: read
packages: write
jobs:
build-ci-image:
name: Build
runs-on: build-amd64
steps:
- uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: ./.github/actions/setup-buildx
- name: Build and push CI image
env:
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--secret id=MISE_GITHUB_TOKEN,env=MISE_GITHUB_TOKEN \
--push \
-t ${{ env.CI_IMAGE }}:${{ github.sha }} \
-t ${{ env.CI_IMAGE }}:latest \
-f deploy/docker/Dockerfile.ci \
.