add new lat/long fields to export, detail pages #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create and publish an image | |
on: | |
push: | |
branches: | |
- "release-**" | |
- "automated_tests" | |
env: | |
IMAGE_NAME: obs-roundabout | |
jobs: | |
# RDB Automated Build and Tagging | |
setup-build-publish: | |
name: RDB Setup, Build, and Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build, Tag & Push Production Image | |
if: contains(github.ref, 'release') | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
IMAGE_ID=ghcr.io/${{ github.repository }} | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
# Strip git ref prefix from branch | |
BRANCH=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "release-" prefix from version | |
VERSION=$(echo $BRANCH | sed -e 's/.*-//') | |
echo "IMAGE_ID:" | |
echo $IMAGE_ID | |
echo "VERSION:" | |
echo $VERSION | |
# Build Production Django Container | |
docker build -f compose/production/django/Dockerfile -t $IMAGE_ID . | |
docker image ls | |
docker tag $IMAGE_ID $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION |