-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 922 Bytes
/
on-release.yml
File metadata and controls
33 lines (29 loc) · 922 Bytes
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
name: On Semantic Release (build & publish image)
on:
release:
types: [released]
jobs:
build_and_publish:
name: Build and publish container image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: ./
push: true
tags: ghcr.io/aam-digital/platform-admin-services:${{ github.event.release.tag_name }},ghcr.io/aam-digital/platform-admin-services:latest
cache-from: type=gha
cache-to: type=gha,mode=max