Skip to content

DAS-1601 - Update platform for service Docker image to AMD64. #14

DAS-1601 - Update platform for service Docker image to AMD64.

DAS-1601 - Update platform for service Docker image to AMD64. #14

name: Publish Harmony GDAL Adapter Docker image
on:
push:
branches: [ main ]
paths: version.txt
env:
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
jobs:
run_tests:
uses: ./.github/workflows/run_tests.yml
build_and_publish_image:
needs: run_tests
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Checkout harmony-gdal-adapter repository
uses: actions/checkout@v4
with:
lfs: true
- name: Extract semantic version number
run: echo "semantic_version=$(cat version.txt)" >> $GITHUB_ENV
- name: Log-in to ghcr.io registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Add tags to the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{ env.semantic_version }}
- name: Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: docker/service.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}