updated Dockerfile

This commit is contained in:
Marvin Zhang
2022-06-03 15:57:23 +08:00
parent 3a1c8a9d10
commit 07cdd324b8
3 changed files with 10 additions and 2 deletions

View File

@@ -123,6 +123,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update Dockerfile
run: |
IMAGE_VERSION=${{needs.setup.outputs.version}}
if [[ $IMAGE_VERSION != "latest" ]]; then
for n in crawlab-backend crawlab-frontend; do
IMAGE_NAME=$n
sed "s/$IMAGE_NAME:latest/$IMAGE_NAME:$IMAGE_VERSION/g" Dockerfile > Dockerfile
done
fi
- name: Build image
run: docker build . --file Dockerfile --tag image
- name: Log into registry

View File

@@ -8,4 +8,3 @@ ENV GO111MODULE on
RUN go mod tidy \
&& go install -v ./...

View File

@@ -6,4 +6,3 @@ RUN rm /app/.npmrc
# install frontend
RUN yarn install && yarn run build:docker