forked from coder/coder
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.49 KB
/
docker-base.yaml
File metadata and controls
60 lines (50 loc) · 1.49 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
name: docker-base
on:
push:
branches:
- main
paths:
- scripts/Dockerfile.base
- scripts/Dockerfile
schedule:
# Run every week at 09:43 on Monday, Wednesday and Friday. We build this
# frequently to ensure that packages are up-to-date.
- cron: "43 9 * * 1,3,5"
workflow_dispatch:
permissions:
contents: read
# Necessary to push docker images to ghcr.io.
packages: write
# Necessary for depot.dev authentication.
id-token: write
# Avoid running multiple jobs for the same commit.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-docker-base
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'coder'
steps:
- uses: actions/checkout@v3
- name: Docker login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create empty base-build-context directory
run: mkdir base-build-context
- name: Install depot.dev CLI
uses: depot/setup-action@v1
# This uses OIDC authentication, so no auth variables are required.
- name: Build base Docker image via depot.dev
uses: depot/build-push-action@v1
with:
project: wl5hnrrkns
context: base-build-context
file: scripts/Dockerfile.base
pull: true
no-cache: true
push: true
tags: |
ghcr.io/coder/coder-base:latest