Skip to content

Commit 1485e43

Browse files
ci: add experimental code that pushes docker images to DockerHub
1 parent a8ab90d commit 1485e43

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,23 @@ jobs:
2121
2222
- name: Build a docker image
2323
run: |
24-
docker build -t opensourcecobol/opensourcecobol4j:"$version_string_prefix" . \
24+
docker build -t opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug . \
2525
--build-arg opensource_COBOL_4J_version="$opensource_COBOL_4J_version" \
2626
--build-arg Open_COBOL_ESQL_4J_version="$Open_COBOL_ESQL_4J_version"
2727
28+
- name: Login to Docker Hub
29+
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
35+
- name: Push to Docker Hub
36+
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
37+
run: |
38+
docker push opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug
39+
docker push opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug-latest
40+
2841
utf8-build:
2942
runs-on: ubuntu-latest
3043

@@ -40,6 +53,18 @@ jobs:
4053
4154
- name: Build a docker image
4255
run: |
43-
docker build -t opensourcecobol/opensourcecobol4j:utf8-"$version_string_prefix" . \
56+
docker build -t opensourcecobol/opensourcecobol4j:utf8-"$version_string_prefix"-debug . \
4457
--build-arg opensource_COBOL_4J_version="$opensource_COBOL_4J_version" \
4558
--build-arg Open_COBOL_ESQL_4J_version="$Open_COBOL_ESQL_4J_version"
59+
60+
- name: Login to Docker Hub
61+
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
62+
uses: docker/login-action@v3
63+
with:
64+
username: ${{ secrets.DOCKERHUB_USERNAME }}
65+
password: ${{ secrets.DOCKERHUB_TOKEN }}
66+
67+
- name: Push to Docker Hub
68+
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
69+
run: |
70+
docker push opensourcecobol/opensourcecobol4j:utf8-"$version_string_prefix"-debug

0 commit comments

Comments
 (0)