File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish images
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ image :
7
+ description : ' Image'
8
+ required : true
9
+ default : ' 1.0.0'
10
+ type : choice
11
+ options :
12
+ - devops-tools
13
+ imageVersion :
14
+ description : ' Image version'
15
+ required : true
16
+ default : ' 1.0.0'
17
+ type : string
18
+ jobs :
19
+ PublishImages :
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - uses : actions/checkout@v3
23
+ - name : Build image
24
+ run : cd "${{ inputs.image }}" && ./build.sh "${{ inputs.imageVersion }}"
25
+ - name : Login to Docker Hub
26
+ uses : docker/login-action@v2
27
+ with :
28
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
29
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
30
+ - name : Push image
31
+ run : cd "${{ inputs.image }}" && ./push.sh "${{ inputs.imageVersion }}"
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e -x
3
3
4
+ _VERSION=${1}
5
+
4
6
source config.sh
5
7
8
+ if [ " x${_VERSION} " != " x" ]; then
9
+ export IMAGE_TAG=" ${_VERSION} "
10
+ fi
11
+
6
12
export IMAGE=" ${IMAGE_REPO} /${IMAGE_NAME} :${IMAGE_TAG} "
7
13
8
14
../scripts/push.sh
You can’t perform that action at this time.
0 commit comments