Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
df45f8ba9c | |||
4ad3a5a519 | |||
fdb8159ab6 | |||
9aee94ee20 | |||
321aa393d2 | |||
5dd538fbb6 | |||
c8b93db337 | |||
53edfe317e | |||
6ed7b99fd9 | |||
b70db03b17 | |||
338f3bf468 | |||
22d678ab22 | |||
c05dd83c88 | |||
82f5744234 | |||
e2c52c0c1e | |||
610f80d88d |
19
action.yml
19
action.yml
@ -1,19 +1,17 @@
|
|||||||
# action.yml
|
# action.yml
|
||||||
name: 'build docker image and push to code'
|
name: "build docker image and push to code"
|
||||||
description: 'build docker image and push to simcu code'
|
description: "build docker image and push to simcu code"
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: build app
|
- name: build app
|
||||||
uses: docker://gradle:jdk21
|
uses: docker://gradle:jdk21
|
||||||
with:
|
with:
|
||||||
entrypoint: "/bin/bash"
|
entrypoint: "/bin/bash"
|
||||||
args: |
|
args: |
|
||||||
-c "export https_proxy=http://100.100.13.14:8118 && \
|
-c "echo 'bootJar {archiveFileName = \"app.jar\"}' >> build.gradle && \
|
||||||
export http_proxy=http://100.100.13.14:8118 && \
|
gradle build -x test -Dhttps.proxyHost=100.100.13.14 -Dhttps.proxyPort=8118 \
|
||||||
gradle build && \
|
-Dhttp.proxyHost=100.100.13.14 -Dhttp.proxyPort=8118 --no-daemon"
|
||||||
cd build/libs && \
|
|
||||||
mv $(ls *.jar) app.jar"
|
|
||||||
|
|
||||||
- name: create dockerfile
|
- name: create dockerfile
|
||||||
uses: docker://ubuntu:latest
|
uses: docker://ubuntu:latest
|
||||||
@ -28,10 +26,13 @@ runs:
|
|||||||
|
|
||||||
- name: build docker image
|
- name: build docker image
|
||||||
uses: docker://docker:git
|
uses: docker://docker:git
|
||||||
|
env:
|
||||||
|
HTTPS_PROXY: http://100.100.13.14:8118
|
||||||
|
HTTP_PROXY: http://100.100.13.14:8118
|
||||||
with:
|
with:
|
||||||
entrypoint: "/bin/sh"
|
entrypoint: "/bin/sh"
|
||||||
args: |
|
args: |
|
||||||
-c 'docker build -t ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} . && \
|
-c 'docker image ls && docker build -t ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} . && \
|
||||||
echo ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \
|
echo ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \
|
||||||
docker login ${{vars.DOCKER_REGISTRY}} -u ${{vars.DOCKER_USER}} -p ${{vars.DOCKER_PASS}} && \
|
docker login ${{vars.DOCKER_REGISTRY}} -u ${{vars.DOCKER_USER}} -p ${{vars.DOCKER_PASS}} && \
|
||||||
docker push ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \
|
docker push ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \
|
||||||
|
Reference in New Issue
Block a user