Skip to content

Change log driver of runpack to json-file #303

Change log driver of runpack to json-file

Change log driver of runpack to json-file #303

name: build-reverse-proxy
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: startup
run: |
cd dockerfiles/reverse-proxy
docker compose -f docker-compose.test.yml up --build -d
- name: test
run: |
sleep 10
curl http://localhost:50132
build:
needs: test
container:
image: docker:git
env:
DOCKER_REPOSITORY: public.ecr.aws/degica/barcelona-reverse-proxy
DOCKER_BUILDKIT: '1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
runs-on: ubuntu-22.04
steps:
- name: workaround
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: prepare
run: |-
apk add --no-cache python3 py3-pip
find /usr/lib/ -type f -name 'EXTERNALLY-MANAGED' -delete
pip3 install --upgrade pip
pip3 install awscli
- uses: actions/checkout@v2
- name: setup
run: git submodule update --init
- name: build_and_push
run: |-
if [[ ${GITHUB_REF##*/} == 'master' ]]; then
IMAGE_TAG="latest" # update the latest image when master is merged
else
IMAGE_TAG=${GITHUB_REF##*/} # branch name for dev usecases
fi
cd dockerfiles/reverse-proxy
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/degica
docker build . -t $DOCKER_REPOSITORY:$IMAGE_TAG --build-arg git_revision=$IMAGE_TAG --pull
docker images
docker push $DOCKER_REPOSITORY:$IMAGE_TAG
'on':
push:
branches:
- '*'