-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (41 loc) · 1.31 KB
/
build-runner.yaml
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
name: Build and push runner image
on:
push:
branches:
- "main"
paths:
- "docker/runner.Dockerfile"
- "docker/runner.Dockerfile.dockerignore"
- ".github/workflows/build-runner.yaml"
pull_request:
paths:
- "docker/runner.Dockerfile"
- "docker/runner.Dockerfile.dockerignore"
- ".github/workflows/build-runner.yaml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
push_to_registry:
name: Build and push runner image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: "🔧 Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Copy requirements.txt"
run: cp requirements.txt docker
shell: bash
- name: Build and push Docker image
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
with:
context: ./docker
file: ./docker/runner.Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/dfinity/dre/actions-runner:${{ github.sha }}