Skip to content

Commit e0d4935

Browse files
committed
Update pipeline for publishing ts version with a tag
1 parent 6b19d71 commit e0d4935

5 files changed

Lines changed: 79 additions & 59 deletions

File tree

.github/workflows/github-actions.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: github-actions
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
tags-ignore:
7+
- "v*.*.*"
8+
jobs:
9+
test-fpml-ts:
10+
uses: ./.github/workflows/test-ts.yml
11+
test-fpml-py:
12+
uses: ./.github/workflows/test-python.yml
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: publish-dockerhub
2+
on:
3+
push:
4+
tags:
5+
- "v*.*.*"
6+
jobs:
7+
test-fpml-ts:
8+
uses: ./.github/workflows/test-ts.yml
9+
10+
publish-fpml-ts-to-dockerhub:
11+
needs: build-and-test-fpml-server-ts
12+
if: github.ref == 'refs/heads/main'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Login to Docker Hub
18+
uses: docker/login-action@v1
19+
with:
20+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
21+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
22+
- name: Set up Docker Buildx
23+
id: buildx
24+
uses: docker/setup-buildx-action@v1
25+
- run: docker run --rm --privileged tonistiigi/binfmt --install all
26+
- name: Write release version
27+
run: |
28+
VERSION=${GITHUB_REF_NAME#v}
29+
echo Version: $VERSION
30+
echo "VERSION=$VERSION" >> $GITHUB_ENV
31+
- run: >-
32+
docker buildx build --platform linux/arm64,linux/amd64
33+
--push
34+
--tag bedasoftware/fhirpath-extract:main
35+
--tag bedasoftware/fhirpath-extract:latest
36+
--tag bedasoftware/fhirpath-extract:$VERSION
37+
.
38+
working-directory: ts/server
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: publish
1+
name: publish-pypi
22
on:
33
push:
44
tags:

.github/workflows/test-ts.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: test-ts
2+
on: [workflow_call]
3+
jobs:
4+
test-fpml-ts:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Copy repository
8+
uses: actions/checkout@v3
9+
10+
- name: Use Node.js 18.x
11+
uses: actions/setup-node@v3
12+
with:
13+
node-version: 18.x
14+
15+
- name: Install Yarn
16+
run: npm install -g yarn
17+
18+
- name: Install dependencies
19+
run: yarn install
20+
working-directory: ts/server
21+
22+
- name: Run tests
23+
run: yarn test
24+
working-directory: ts/server
25+
26+
- name: Run tests
27+
run: yarn test:e2e
28+
working-directory: ts/server

0 commit comments

Comments
 (0)