[ github-action ] 新增Agent版本控制 - 2
This commit is contained in:
8
.github/workflows/build-push-docker.yml
vendored
8
.github/workflows/build-push-docker.yml
vendored
@@ -114,7 +114,6 @@ jobs:
|
||||
# An explicit key for restoring and saving the cache
|
||||
key: octopus-springboot-2.3.6
|
||||
|
||||
|
||||
- name: Maven package project
|
||||
run: |
|
||||
mvn -B -DskipTests=true install --file pom.xml
|
||||
@@ -129,11 +128,12 @@ jobs:
|
||||
cd ./agent/target
|
||||
ls
|
||||
echo "start to change timezone to Asia/Shanghai"
|
||||
# timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true
|
||||
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
|
||||
echo "current time is $(date)"
|
||||
|
||||
echo "current format date is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
|
||||
echo "current date is $(date)"
|
||||
echo "start to copy target jar"
|
||||
|
||||
echo "write the version info to env"
|
||||
echo "AGENT_VERSION=$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")" >> $GITHUB_ENV
|
||||
|
||||
cp ./agent-*.jar ./octopus-agent-${{ env.AGENT_VERSION }}.jar
|
||||
|
||||
Reference in New Issue
Block a user