Skip to content

More updates

More updates #3

Workflow file for this run

name: Publish Image
on:
push:
branches:
- main
tags:
- '*'
paths:
- ./version.json
jobs:
build:
env:
context: .
image_name: publish-stac-task
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Get image tags
id: image_tags
run: |
echo -n ::set-output name=IMAGE_TAGS::
VERSION=$(jq -r '.version' ${context}/version.json)
TAGS=('latest')
if [ "${VERSION}" ] && [ "${VERSION}" != "latest" ]; then
TAGS+=("${VERSION}")
fi
if [[ "${GITHUB_REF}" =~ refs/tags/(.*) ]]; then
TAGS+=("git-${BASH_REMATCH[1]}")
fi
( IFS=$','; echo "${TAGS[*]}" )
- name: Build and publish image to Quay
uses: docker/build-push-action@v1
with:
path: ${{ env.context }}
registry: ${{ secrets.REGISTRY_URI }}
repository: ${{ secrets.REGISTRY_REPOSITORY }}/${{ env.image_name }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
tags: "${{ steps.image_tags.outputs.IMAGE_TAGS }}"