mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-29 12:07:56 +01:00
Merge pull request #13409 from heww/github-actions-update
ci: update env and path commands in github actions
This commit is contained in:
commit
c0cc900d25
34
.github/workflows/CI.yml
vendored
34
.github/workflows/CI.yml
vendored
@ -47,9 +47,9 @@ jobs:
|
|||||||
cd src/github.com/goharbor/harbor
|
cd src/github.com/goharbor/harbor
|
||||||
pwd
|
pwd
|
||||||
go env
|
go env
|
||||||
echo "::set-env name=GOPATH::$(go env GOPATH):$GITHUB_WORKSPACE"
|
echo "GOPATH=$(go env GOPATH):$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||||
echo "::add-path::$(go env GOPATH)/bin"
|
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
echo "::set-env name=TOKEN_PRIVATE_KEY_PATH::${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem"
|
echo "TOKEN_PRIVATE_KEY_PATH=${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: before_install
|
- name: before_install
|
||||||
run: |
|
run: |
|
||||||
@ -64,7 +64,7 @@ jobs:
|
|||||||
sudo mv docker-compose /usr/local/bin
|
sudo mv docker-compose /usr/local/bin
|
||||||
IP=`hostname -I | awk '{print $1}'`
|
IP=`hostname -I | awk '{print $1}'`
|
||||||
echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
|
echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
|
||||||
echo "::set-env name=IP::$IP"
|
echo "IP=$IP" >> $GITHUB_ENV
|
||||||
sudo cp ./tests/harbor_ca.crt /usr/local/share/ca-certificates/
|
sudo cp ./tests/harbor_ca.crt /usr/local/share/ca-certificates/
|
||||||
sudo update-ca-certificates
|
sudo update-ca-certificates
|
||||||
sudo service docker restart
|
sudo service docker restart
|
||||||
@ -113,12 +113,12 @@ jobs:
|
|||||||
cd src/github.com/goharbor/harbor
|
cd src/github.com/goharbor/harbor
|
||||||
pwd
|
pwd
|
||||||
go env
|
go env
|
||||||
echo "::set-env name=GITHUB_TOKEN::${{ secrets.GITHUB_TOKEN }}"
|
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=GOPATH::$(go env GOPATH):$GITHUB_WORKSPACE"
|
echo "GOPATH=$(go env GOPATH):$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||||
echo "::add-path::$(go env GOPATH)/bin"
|
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
echo "::set-env name=TOKEN_PRIVATE_KEY_PATH::${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem"
|
echo "TOKEN_PRIVATE_KEY_PATH=${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem" >> $GITHUB_ENV
|
||||||
IP=`hostname -I | awk '{print $1}'`
|
IP=`hostname -I | awk '{print $1}'`
|
||||||
echo "::set-env name=IP::$IP"
|
echo "IP=$IP" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: before_install
|
- name: before_install
|
||||||
run: |
|
run: |
|
||||||
@ -173,11 +173,11 @@ jobs:
|
|||||||
cd src/github.com/goharbor/harbor
|
cd src/github.com/goharbor/harbor
|
||||||
pwd
|
pwd
|
||||||
go env
|
go env
|
||||||
echo "::set-env name=GOPATH::$(go env GOPATH):$GITHUB_WORKSPACE"
|
echo "GOPATH=$(go env GOPATH):$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||||
echo "::add-path::$(go env GOPATH)/bin"
|
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
echo "::set-env name=TOKEN_PRIVATE_KEY_PATH::${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem"
|
echo "TOKEN_PRIVATE_KEY_PATH=${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem" >> $GITHUB_ENV
|
||||||
IP=`hostname -I | awk '{print $1}'`
|
IP=`hostname -I | awk '{print $1}'`
|
||||||
echo "::set-env name=IP::$IP"
|
echo "IP=$IP" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: before_install
|
- name: before_install
|
||||||
run: |
|
run: |
|
||||||
@ -232,9 +232,9 @@ jobs:
|
|||||||
pwd
|
pwd
|
||||||
docker version
|
docker version
|
||||||
go env
|
go env
|
||||||
echo "::set-env name=GOPATH::$(go env GOPATH):$GITHUB_WORKSPACE"
|
echo "GOPATH=$(go env GOPATH):$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||||
echo "::add-path::$(go env GOPATH)/bin"
|
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
echo "::set-env name=TOKEN_PRIVATE_KEY_PATH::${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem"
|
echo "TOKEN_PRIVATE_KEY_PATH=${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: before_install
|
- name: before_install
|
||||||
run: |
|
run: |
|
||||||
@ -250,7 +250,7 @@ jobs:
|
|||||||
sudo mv docker-compose /usr/local/bin
|
sudo mv docker-compose /usr/local/bin
|
||||||
IP=`hostname -I | awk '{print $1}'`
|
IP=`hostname -I | awk '{print $1}'`
|
||||||
echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
|
echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
|
||||||
echo "::set-env name=IP::$IP"
|
echo "IP=$IP" >> $GITHUB_ENV
|
||||||
sudo cp ./tests/harbor_ca.crt /usr/local/share/ca-certificates/
|
sudo cp ./tests/harbor_ca.crt /usr/local/share/ca-certificates/
|
||||||
sudo update-ca-certificates
|
sudo update-ca-certificates
|
||||||
sudo service docker restart
|
sudo service docker restart
|
||||||
|
Loading…
Reference in New Issue
Block a user