Skip to content
on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
name: Publish Quote Server Adaptor Docker image
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: PrepareReg Names
run: |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Log in to GitHub Docker Registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
file: quote-server-adaptor.Dockerfile
push: true
tags: |
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/quote-server-adaptor:${{ github.sha }}
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/quote-server-adaptor:${{ github.event.release.tag_name }}
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/quote-server-adaptor:latest