forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (43 loc) · 1.24 KB
/
check-devcontainer.yml
File metadata and controls
43 lines (43 loc) · 1.24 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
name: Check Devcontainer
on:
pull_request:
paths:
- .devcontainer/**
- pyproject.toml
- poetry.lock
- .github/workflows/check-devcontainer.yml
push:
branches:
- master
paths:
- .devcontainer/**
- pyproject.toml
- poetry.lock
- .github/workflows/check-devcontainer.yml
jobs:
Build-Devcontainer:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update .devcontainer.json description
run: |
# replace the first line of .devcontainer/devcontainer.json with the new description
POETRY_LOCK_HASH=${{ hashFiles('poetry.lock') }}
sed -i "1s/^.*$/\/\/ Development container for Content. Poetry hash $POETRY_LOCK_HASH/" .devcontainer/devcontainer.json
- name: commit file
if: github.ref == 'refs/heads/master'
uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: Update .devcontainer.json name
- name: Run demisto-sdk in devcontainer
uses: devcontainers/ci@v0.2
with:
push: never
runCmd: demisto-sdk --version