-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (41 loc) · 1.52 KB
/
ci.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
name: Prebuild docker image
on:
push:
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
name: BUILD
runs-on: ubuntu-22.04
timeout-minutes: 600
steps:
- uses: actions/checkout@v4
with:
ref: "mczyz/dev"
# - name: Pre-build dev container image
# uses: devcontainers/[email protected]
# with:
# imageName: ghcr.io/openroad-codespace/test
# cacheFrom: ghcr.io/openroad-codespace/test
# push: always
# configFile: ./.devcontainer/ubuntu-gui/devcontainer.json
- name: Devcontainer build
run: |
npm install -g @devcontainers/cli
devcontainer build --config .devcontainer/ubuntu-gui/devcontainer.json --workspace-folder . --push false --image-name test:latest
docker image tag test:latest ghcr.io/antmicro/openroad-codespace:test
- name: Login to GitHub Container Registry (GHCR)
if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: gha
password: ${{ github.token }}
- name: Push container image to GitHub Container Registry (GHCR)
if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace'
run: docker push ghcr.io/antmicro/openroad-codespace:test