diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 48519294..68bfe1cc 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -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 diff --git a/backend/Dockerfile b/backend/Dockerfile index 497cd804..40c0c152 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,4 +8,3 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... - diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 21a6324a..97b83d37 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,4 +6,3 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker -