Skip to content

Commit

Permalink
fix: update trigger_file path in tag.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji-Yuhang committed May 5, 2022
1 parent 46b2d69 commit 5f08249
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ trigger_file=trigger.${now}.txt
tag_sh_file=tag.${now}.sh

curl -s https://github.jiyuhang.workers.dev/https://raw.githubusercontent.com/Ji-Yuhang/docker-pull-proxy/main/trigger.txt -o $trigger_file
echo $file
echo $trigger_file

cat $file |awk '{print "docker pull "$2} '
cat $file |awk '{print "docker tag "$2 " " $1} '
cat $trigger_file |awk '{print "docker pull "$2} '
cat $trigger_file |awk '{print "docker tag "$2 " " $1} '


cat $file |awk '{print "docker pull "$2} ' > $tag_sh_file
cat $file |awk '{print "docker tag "$2 " " $1} ' >> $tag_sh_file
cat $trigger_file |awk '{print "docker pull "$2} ' > $tag_sh_file
cat $trigger_file |awk '{print "docker tag "$2 " " $1} ' >> $tag_sh_file

# cat $file |awk '{print "ansible all -m command -a \"docker pull " $2 "\"" } '
# cat $file |awk '{print "ansible all -m command -a \"docker tag " $2 $1 "\"" } '
echo $tag_sh_file

ansible all -m script -a $tag_sh_file

Expand Down
4 changes: 2 additions & 2 deletions tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo $trigger_file
cat $trigger_file |awk '{print "docker pull "$2} '
cat $trigger_file |awk '{print "docker tag "$2 " " $1} '

cat $file |awk '{print "docker pull "$2} ' > $tag_sh_file
cat $file |awk '{print "docker tag "$2 " " $1} ' >> $tag_sh_file
cat $trigger_file |awk '{print "docker pull "$2} ' > $tag_sh_file
cat $trigger_file |awk '{print "docker tag "$2 " " $1} ' >> $tag_sh_file

sh $tag_sh_file

0 comments on commit 5f08249

Please sign in to comment.