-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathup
executable file
·21 lines (16 loc) · 1.16 KB
/
up
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# sudo gh extension install nektos/gh-act #sudo, will use docker inside, else permission denied
sudo gh act -r -j ubuild --env init=1 workflow_dispatch -W .github/workflows/up.yml
#sudo gh act -r -j testbuild --env init=1 workflow_dispatch -W .github/workflows/test.yml #-W ? Error: ... https://github.com/nektos/act/issues/1993
#$(which act) . upload_release_asset at colin-i/test was with error
# sudo docker save ghcr.io/catthehacker/ubuntu:act-18.04 -o a.tar ; sudo docker load -i a.tar
container=`sudo docker ps -a | grep up-yml | cut -d ' ' -f1`
#container=`sudo docker ps -a | grep test-yml | cut -d ' ' -f1`
name=`cat debian/changelog | head -1 | grep -o ^[^\ ]*`
sudo docker container cp ${name}.zip ${container}:`pwd`/${name}.zip
#sudo docker container cp test ${container}:`pwd`/test
sudo gh act -r -j ubuild --env proj=${name} -s PAT=`cat ~/n/pat` workflow_dispatch -W .github/workflows/up.yml && \
#sudo gh act -r -j testbuild --env proj=${name} -s PAT=`cat ~/n/pat` workflow_dispatch -W .github/workflows/test.yml && \
rm ${name}.zip && \
sudo docker container stop ${container} && \
sudo docker container rm ${container}
#sudo docker volume list #it's only one for file