Skip to content

geocoder 3.4.0

geocoder 3.4.0 #4

name: build-deploy-release
on:
release:
types: [published]
jobs:
deploy-images:
runs-on: ubuntu-latest
env:
registry: ghcr.io
username: degauss-org
repository: geocoder
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: create latest tag variable
run: |
container="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:latest"
echo "container=${container}" >> $GITHUB_ENV
- name: create release tag variable
if: github.event_name == 'release'
run: |
versioned="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:${GITHUB_REF##*/}"
echo "versioned=${versioned}" >> $GITHUB_ENV
- name: build container
run: |
docker build -t ${{ env.container }} .
- name: test container
run: |
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file.csv
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file.csv 0.6
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file.csv all
- name: login to ghcr
uses: docker/login-action@v1
with:
registry: ${{ env.registry }}
username: ${{ env.username }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: deploy release (and latest) container
run: |
docker tag ${{ env.container }} ${{ env.versioned }}
docker push ${{ env.versioned }}
docker push ${{ env.container }}