Skip to content

Merge pull request #23 from demisto/fix_the_build_template #162

Merge pull request #23 from demisto/fix_the_build_template

Merge pull request #23 from demisto/fix_the_build_template #162

Workflow file for this run

name: CI
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
python-version: "3.10"
- name: Cache pip dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
mkdir -p Packs
pip install -r .github/requirements.txt
if [ ! "$(ls -A Packs)" ]; then
echo No files in Packs
tools/update_helloworld_example.sh
fi
tools/update_repo.sh
- uses: actions/setup-node@v1
with:
node-version: '12'
- run: npm ci
# Runs a set of commands using the runners shell
- name: Run lint on all the packs
run: |
mkdir artifacts
demisto-sdk lint -a --log-file-path ./artifacts/lint_debug_log.log
- name: Archive unit test results
uses: actions/upload-artifact@v1
with:
name: lint_debug_log
path: artifacts/lint_debug_log.log
- name: Create ID Set
run: |
demisto-sdk create-id-set -o artifacts/pack_id_set.json
gsutil -m cp -r gs://marketplace-dist/content/private_id_set.json artifacts/private_id_set.json
gsutil -m cp -r gs://marketplace-dist/content/id_set.json artifacts/id_set.json
demisto-sdk merge-id-sets -i1 artifacts/private_id_set.json -i2 artifacts/id_set.json -o artifacts/id_set.json
demisto-sdk merge-id-sets -i1 artifacts/pack_id_set.json -i2 artifacts/id_set.json -o artifacts/id_set.json
- name: Upload ID set file to artifacts
if: always()
uses: actions/upload-artifact@v1
with:
name: id_set
path: artifacts/id_set.json
- name: Validate all packs
run: |
git fetch
git branch
demisto-sdk validate -a --id-set-path artifacts/id_set.json
- name: Create Artifacts
if: always()
run: demisto-sdk create-content-artifacts --artifacts_path artifacts
- name: Archive Content Packs zip
if: always()
uses: actions/upload-artifact@v1
with:
name: content_packs
path: artifacts/content_packs.zip