-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (33 loc) · 1019 Bytes
/
docker-image.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
name: Docker Image CI
on:
release:
types:
- created
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Log in to the Container registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Checkout, build and push
uses: actions/checkout@v4
- run: |
FULL_IMAGE_NAME="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
FULL_IMAGE_NAME_LC="${FULL_IMAGE_NAME,,}"
./buildDocker.sh
docker image tag sso-stub:latest "$FULL_IMAGE_NAME_LC:${{ github.event.release.tag_name }}"
docker push $FULL_IMAGE_NAME_LC