-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.4 KB
/
quote-server-adaptor-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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@v4
- 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@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
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