Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
rubocop-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Rubocop review
uses: andrewmcodes/rubocop-linter-action@v3.0.0
Expand All @@ -42,23 +42,23 @@ jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Rubocop
run: |
docker-compose run --rm verify bash -c "bundle install && bundle exec rubocop"
docker compose run --rm verify bash -c "bundle install && bundle exec rubocop"

- name: RSpec
run: |
docker-compose run --rm verify bash -c "bundle install && bundle exec rspec"
docker compose run --rm verify bash -c "bundle install && bundle exec rspec"


build-docs:
needs: [verify]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Normalize env vars
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG PYTHON_VERSION=3.7
ARG NGINX_VERSION=1.17-alpine

#building
FROM python:$PYTHON_VERSION as builder
FROM python:$PYTHON_VERSION AS builder

RUN mkdir -p /opt/app

Expand Down
5 changes: 4 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Sphinx
sphinx-autobuild

# fix CI/CD first
livereload

# tempory fix for https://github.com/lepture/python-livereload/issues/132
git+https://github.com/hoatle/python-livereload.git#master
# git+https://github.com/hoatle/python-livereload.git@master

16 changes: 8 additions & 8 deletions scripts/normalize_github_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ -n "${CI_REGISTRY_IMAGE}" ] && [ -z "$DOCKER_PUSH_ENABLED" ] ; then
# CI_REGISTRY_IMAGE is a docker hub username (without any slash), hoatle, for example
export DOCKER_LOGIN_SERVER=https://index.docker.io/v1/ # or https://registry-1.docker.io/v2/ ?
fi
echo "::set-env name=DOCKER_LOGIN_SERVER::$DOCKER_LOGIN_SERVER"
echo "DOCKER_LOGIN_SERVER=$DOCKER_LOGIN_SERVER" >> $GITHUB_ENV

fi

Expand All @@ -55,7 +55,7 @@ if [ -z "${CI_REGISTRY_IMAGE}" ]; then
export GITHUB_REPOSITORY=$(echo "${GITHUB_REPOSITORY}" | awk '{print tolower($0)}')
export CI_REGISTRY_IMAGE=docker.pkg.github.com/$GITHUB_REPOSITORY
echo "CI_REGISTRY_IMAGE env var not defined, set default to: $CI_REGISTRY_IMAGE"
echo "::set-env name=GITHUB_PACKAGE_REGISTRY::true"
echo "GITHUB_PACKAGE_REGISTRY=true" >> $GITHUB_ENV
if [ -z "$DOCKER_USERNAME" ] && [ -z "$DOCKER_PASSWORD" ] ; then
export DOCKER_USERNAME=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f1)
export DOCKER_PASSWORD=${GITHUB_TOKEN}
Expand All @@ -65,12 +65,12 @@ fi


if contains "$CI_REGISTRY_IMAGE" "gcr.io" ; then
echo "::set-env name=PUSH_TO_GCR::true"
echo "PUSH_TO_GCR=true" >> $GITHUB_ENV
fi


echo "::set-env name=IMG_TAG::$IMG_TAG"
echo "::set-env name=CI_REGISTRY_IMAGE::$CI_REGISTRY_IMAGE"
echo "::set-env name=DOCKER_USERNAME::$DOCKER_USERNAME"
echo "::set-env name=DOCKER_PASSWORD::$DOCKER_PASSWORD"
echo "::set-env name=DOCKER_PUSH_ENABLED::$DOCKER_PUSH_ENABLED"
echo "IMG_TAG=$IMG_TAG" >> $GITHUB_ENV
echo "CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE" >> $GITHUB_ENV
echo "DOCKER_USERNAME=$DOCKER_USERNAME" >> $GITHUB_ENV
echo "DOCKER_PASSWORD=$DOCKER_PASSWORD" >> $GITHUB_ENV
echo "DOCKER_PUSH_ENABLED=$DOCKER_PUSH_ENABLED" >> $GITHUB_ENV
2 changes: 1 addition & 1 deletion scripts/re_export_env_var.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ do
export $new_key=${!k}
if [ -n "${GITHUB_WORKSPACE}" ]; then
# export it here if github actions
echo "::set-env name=$new_key::${!k}"
echo "$new_key=${!k}" >> $GITHUB_ENV
fi
fi
fi
Expand Down
Loading