Skip to content

Commit 851f4a7

Browse files
authored
ci: add docker building on merge to main or workflow changes (#78)
1 parent 5bbe067 commit 851f4a7

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/scip-docker.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: docker-scip
2+
3+
on:
4+
push:
5+
branches:
6+
- scip
7+
pull_request:
8+
paths:
9+
- '.github/workflows/**'
10+
- 'Dockerfile.autoindex'
11+
12+
jobs:
13+
release-image:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install asdf.
18+
uses: asdf-vm/actions/setup@v2.1.0
19+
- name: Cache asdf and asdf-managed tools.
20+
uses: actions/cache@v3.3.1
21+
id: asdf-cache
22+
with:
23+
path: ${{ env.ASDF_DIR }}
24+
key: asdf-${{ runner.os}}-${{ hashFiles('**/.tool-versions') }}
25+
- name: Install asdf tools (if not cached).
26+
if: steps.asdf-cache.outputs.cache-hit != 'true'
27+
uses: asdf-vm/actions/install@v2.1.0
28+
- name: Get npm cache directory
29+
id: npm-cache
30+
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
31+
- uses: actions/cache@v2
32+
with:
33+
path: ${{ steps.npm-cache.outputs.dir }}
34+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
35+
restore-keys: |
36+
${{ runner.os }}-node-
37+
- run: npm install
38+
- run: cd ./packages/pyright-scip/ && npm install && npm run build
39+
- uses: docker/setup-buildx-action@v1
40+
- name: Build Dockerfile
41+
id: docker_build_autoindex
42+
uses: docker/build-push-action@v2
43+
with:
44+
file: Dockerfile.autoindex
45+
push: false
46+
tags: |
47+
sourcegraph/scip-python:test

0 commit comments

Comments
 (0)