-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (39 loc) · 1.14 KB
/
devcontainer-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
name: CI - Devcontainer
on:
# Trigger the workflow only if PR is merged
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and use devcontainer
uses: devcontainers/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_NUMBER: ${{ github.run_id }}
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
with:
imageName: ghcr.io/anselmoo/spectrafit-devcontainer
imageTag: ${{ steps.set_image_tag.outputs.image_tag }}
runCmd: |
python --version
push: ${{ steps.set_image_push_option.outputs.image_push_option }}
eventFilterForPush: |
push
pull_request
env: |
BUILD_NUMBER
IS_CI=1
IS_PR
BRANCH