Skip to content

Commit ba95942

Browse files
Release docker image on main branch builds as well
1 parent 493c22b commit ba95942

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
tags:
66
- v*
7+
branches:
8+
- main
79

810
jobs:
911
release-image:
@@ -29,8 +31,17 @@ jobs:
2931
with:
3032
username: ${{ secrets.DOCKER_USERNAME }}
3133
password: ${{ secrets.DOCKER_PASSWORD }}
32-
- name: Build and push
34+
- name: Build and push snapshot
3335
id: docker_build
36+
if: github.ref == 'refs/heads/main'
37+
uses: docker/build-push-action@v3
38+
with:
39+
push: true
40+
tags: |
41+
sourcegraph/scip-typescript:latest-snapshot
42+
- name: Build and push tag
43+
id: docker_build
44+
if: startsWith(github.ref, 'refs/tags/v')
3445
uses: docker/build-push-action@v3
3546
with:
3647
push: true

0 commit comments

Comments
 (0)