Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 63c5828

Browse files
authored
fix: update docker action
1 parent 93bfcec commit 63c5828

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/package.yml renamed to .github/workflows/docker.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Docker image
1+
name: Publish Docker image and deploy
22
on:
33
release:
44
types: [published]
@@ -35,16 +35,20 @@ jobs:
3535
path: dist
3636
- name: npm install and test
3737
run: |
38-
npm install
38+
npm ci
3939
npm test
40-
4140
push_to_registry:
4241
name: Push Docker image to GitHub Packages
4342
needs: test
4443
runs-on: ubuntu-latest
4544
steps:
4645
- name: check out the repo
4746
uses: actions/checkout@v2
47+
- name: get-npm-version
48+
id: package-version
49+
uses: martinbeentjes/npm-get-version-action@master
50+
- name: version dockerfile
51+
run: sed -i 's/v0.0.0/v${{ steps.package-version.outputs.current-version}}/g' Dockerfile
4852
- name: set up Docker builder
4953
uses: docker/setup-buildx-action@v1
5054
- name: log into GitHub Container Registry
@@ -59,5 +63,5 @@ jobs:
5963
context: .
6064
push: true
6165
tags: |
62-
ghcr.io/eddiehubcommunity/api:v0.1.${{ github.run_number }}
66+
ghcr.io/eddiehubcommunity/api:v${{ steps.package-version.outputs.current-version}}
6367
ghcr.io/eddiehubcommunity/api:latest

0 commit comments

Comments
 (0)