-
Notifications
You must be signed in to change notification settings - Fork 29
42 lines (37 loc) · 1.2 KB
/
devcontainer.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
# Build Dev Container image to be used with Microsoft Visual Studio Code and Github Codespaces
#
# See https://github.com/tradingstrategy-ai/getting-started
#
name: Dev Container Docker image
on:
push:
branches: [ master ]
tags: [ v* ]
pull_request:
branches: [ master ]
jobs:
devcontainer:
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Scrape build info
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Run Devcontainer build
uses: devcontainers/[email protected]
with:
push: always
imageName: ghcr.io/tradingstrategy-ai/devcontainer
env: |
GIT_VERSION_TAG=${{ env.RELEASE_VERSION }}
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
GIT_VERSION_HASH=${{ github.sha }}