diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fcddfe1..4722dca 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -83,7 +83,7 @@ jobs: context: . push: true tags: | - lsstsqre/mobu:${{ steps.vars.outputs.tag }} - ghcr.io/lsst-sqre/mobu:${{ steps.vars.outputs.tag }} + lsstsqre/influx-bucket-mapper:${{ steps.vars.outputs.tag }} + ghcr.io/lsst-sqre/influx-bucket-mapper:${{ steps.vars.outputs.tag }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/bucketmapper b/bucketmapper index b94e6d3..ab34ecf 100755 --- a/bucketmapper +++ b/bucketmapper @@ -9,8 +9,8 @@ import aiohttp # InfluxDB2 defaults -DEFAULT_URL = "http://localhost:8086" DEFAULT_ORG = "default" +DEFAULT_URL = "http://localhost:8086" # Simple typealiases to represent InfluxDB v2 object fields # Unless otherwise specified, they can be found at: diff --git a/scripts/docker-tag.sh b/scripts/docker-tag.sh new file mode 100755 index 0000000..080a9c9 --- /dev/null +++ b/scripts/docker-tag.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Determine the tag for Docker images based on GitHub Actions environment +# variables. + +set -eo pipefail + +if [ -n "$GITHUB_HEAD_REF" ]; then + # For pull requests + echo ${GITHUB_HEAD_REF} | sed -E 's,/,-,g' +else + # For push events + echo ${GITHUB_REF} | sed -E 's,refs/(heads|tags)/,,' | sed -E 's,/,-,g' +fi