-
-
Notifications
You must be signed in to change notification settings - Fork 140
39 lines (31 loc) · 1.08 KB
/
docker-publish.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-publish
on:
push:
tags:
- v*
jobs:
build:
name: Build and publish '${{ matrix.project }}' to Docker Registry
strategy:
fail-fast: true
matrix:
project: [api, ssh, gateway, ui, cli, connector]
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Get release version
id: get_version
run: echo RELEASE_VERSION=$(echo ${GITHUB_REF:10}) >> $GITHUB_ENV
- name: Set docker build args
if: matrix.project == 'connector'
run: echo "BUILD_ARGS=SHELLHUB_VERSION=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
- name: Build and publish '${{ matrix.project }}' to Docker Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: shellhubio/${{ matrix.project }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ env.RELEASE_VERSION }}"
dockerfile: ${{ matrix.project }}/Dockerfile
buildargs: ${{ env.BUILD_ARGS }}