Skip to content

[80] location data edits not saving (#132) #42

[80] location data edits not saving (#132)

[80] location data edits not saving (#132) #42

name: Curator Service Github Packages Push
on:
# Build whenever a PR is merged into the main branch.
push:
branches: [main]
paths:
- ".github/workflows/curator-service-package.yml"
- "verification/curator-service/**"
- "!verification/curator-service/auth.md"
# Build whenever a new tag is created.
tags:
- "*"
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/curator-service-package.yml"
jobs:
build-and-push:
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
-
name: Prepare
id: prep
run: |
DOCKER_IMAGE=ghcr.io/${{github.repository}}/curatorservice
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [ "${{ github.event_name }}" = "push" ]; then
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- uses: docker/login-action@v2
with:
username: ${{ github.actor }}
# https://github.com/globaldothealth/list/settings/secrets
# https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- uses: docker/build-push-action@v3
with:
file: verification/curator-service/Dockerfile
push: true
tags: ${{ steps.prep.outputs.tags }}
build-args:
CURATOR_VERSION=${{ steps.prep.outputs.version }}