File tree 1 file changed +17
-2
lines changed
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 12
12
env :
13
13
DOCKER_FILE_PATH : " fly"
14
14
IMAGE : " ghcr.io/${{github.repository_owner}}/concourse-fly"
15
+ DOCKERHUB_ORG : elpaasoci
15
16
jobs :
16
17
build_and_publish :
17
18
name : build and publish
@@ -21,21 +22,34 @@ jobs:
21
22
22
23
steps :
23
24
- uses : actions/checkout@v4
25
+ -
26
+ name : Login to DockerHub
27
+ uses : docker/login-action@v3
28
+ with :
29
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
30
+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
24
31
-
25
32
name : Login to GitHub Container Registry
26
33
uses : docker/login-action@v3
27
34
with :
28
35
registry : ghcr.io
29
36
username : ${{ github.actor }}
30
37
password : ${{ secrets.GITHUB_TOKEN }}
31
-
38
+ -
39
+ name : extract github repo name
40
+ id : gh-repo-name
41
+ run : |
42
+ echo "OCI_IMAGE=$(basename ${{ github.repository }})" >> $GITHUB_ENV
43
+ shell : bash
32
44
-
33
45
name : publish image
34
46
35
47
with :
36
48
context : ${{env.DOCKER_FILE_PATH}}
37
49
push : true
38
50
tags : |
51
+ ${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:latest
52
+ ${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:${{github.sha}}
39
53
${{ env.IMAGE}}:latest
40
54
${{ env.IMAGE}}:${{github.sha}}
41
55
-
46
60
push : true
47
61
context : ${{ env.DOCKER_FILE_PATH }}
48
62
tags : |
49
- ${{ env.IMAGE}}:${{github.ref_name}}
63
+ ${{env.DOCKERHUB_ORG}}/${{env.OCI_IMAGE}}:${{github.ref_name}}
64
+ ${{env.IMAGE}}:${{github.ref_name}}
You can’t perform that action at this time.
0 commit comments