Skip to content

Commit

Permalink
Gh-action-fix (#349)
Browse files Browse the repository at this point in the history
* Gh-action-fix
  • Loading branch information
lucernae authored Nov 28, 2021
1 parent 5b94d52 commit f5bc38f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 34 deletions.
14 changes: 6 additions & 8 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Ignore everything except selected directory
**

!base_build
base_build/README.md

!scripts
!scenario_tests/utils/requirements.txt
.github
.venv
venv
.docs
sample
.env
32 changes: 10 additions & 22 deletions .github/workflows/build-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ on:
# required: true
# default: slim
workflow_dispatch:
inputs:
cache-invalidation-number:
description: Temporarily increase this number to invalidate caches for current build
required: true
default: 1
no-cache:
description: Do not use cache when building the image
required: true
type: boolean
default: false
pull_request:
branches:
- develop
Expand Down Expand Up @@ -64,7 +54,6 @@ jobs:
with:
context: .
file: Dockerfile
no-cache: ${{ github.event.inputs.no-cache }}
push: false
load: true
tags: kartoza/postgis:manual-build
Expand All @@ -77,11 +66,11 @@ jobs:
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
# cache-from: |
# type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}-
# type=gha,scope=prod-${{ github.event.inputs.cache-invalidation-number }}-
# type=gha,scope=base-${{ github.event.inputs.cache-invalidation-number }}-
cache-to: type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}-
cache-from: |
type=gha,scope=test
type=gha,scope=prod
type=gha,scope=base
cache-to: type=gha,scope=test
target: postgis-test

- name: Run scenario test ${{ matrix.scenario }}
Expand Down Expand Up @@ -135,7 +124,6 @@ jobs:
with:
context: .
file: Dockerfile
no-cache: ${{ github.event.inputs.no-cache }}
push: true
tags: |
${{ steps.docker_meta.outputs.tags }}-${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}
Expand All @@ -148,9 +136,9 @@ jobs:
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
# cache-from: |
# type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}-
# type=gha,scope=prod-${{ github.event.inputs.cache-invalidation-number }}-
# type=gha,scope=base-${{ github.event.inputs.cache-invalidation-number }}-
cache-to: type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}-
cache-from: |
type=gha,scope=test
type=gha,scope=prod
type=gha,scope=base
cache-to: type=gha,scope=test
target: postgis-test
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8

COPY base_build/scripts/locale.gen /etc/all.locale.gen
COPY base_build/scripts/locale-filter.sh /etc/locale-filter.sh
COPY ./base_build/scripts/locale.gen /etc/all.locale.gen
COPY ./base_build/scripts/locale-filter.sh /etc/locale-filter.sh
RUN if [ -z "${GENERATE_ALL_LOCALE}" ] || [ $GENERATE_ALL_LOCALE -eq 0 ]; \
then \
cat /etc/all.locale.gen | grep "${LANG}" > /etc/locale.gen; \
Expand Down Expand Up @@ -126,7 +126,7 @@ RUN apt-get -y --purge autoremove \
EXPOSE 5432

# Copy scripts
ADD scripts /scripts
ADD ./scripts /scripts
WORKDIR /scripts
RUN chmod +x *.sh

Expand All @@ -145,7 +145,7 @@ ENTRYPOINT /scripts/docker-entrypoint.sh
##############################################################################
FROM postgis-prod AS postgis-test

COPY scenario_tests/utils/requirements.txt /lib/utils/requirements.txt
COPY ./scenario_tests/utils/requirements.txt /lib/utils/requirements.txt

RUN set -eux \
&& export DEBIAN_FRONTEND=noninteractive \
Expand Down

0 comments on commit f5bc38f

Please sign in to comment.