This commit is contained in:
parent
3ab46ab5c0
commit
32b3a17a07
|
@ -0,0 +1,58 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Cron To-To-To
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "47 5 * * *"
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: To-To-To
|
||||
run: |
|
||||
set -x
|
||||
|
||||
source libs/aliyun.sh
|
||||
install_aliyun_ossutil
|
||||
|
||||
initdir=`pwd`
|
||||
|
||||
source ${initdir}/libs/common.sh
|
||||
|
||||
cat ${initdir}/sed/* > ${initdir}/toto.sed
|
||||
|
||||
|
||||
for project in `cat cron.list`
|
||||
do
|
||||
|
||||
|
||||
uuid=`date "+%s%N"`
|
||||
workdir="${initdir}/tmp/${uuid}"
|
||||
mkdir -p $workdir
|
||||
|
||||
git clone $project $workdir
|
||||
ls $workdir
|
||||
|
||||
find ./webs -name toto.sh -exec /bin/bash {} $workdir $initdir \;
|
||||
|
||||
src=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $1}'`
|
||||
dest=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $2}'`
|
||||
|
||||
./ossutil --access-key-id ${{ secrets.ALIYUN_CYG_OSS_AK }} --access-key-secret ${{ secrets.ALIYUN_CYG_OSS_SK }} --endpoint ${{ secrets.ALIYUN_CYG_OSS_ENDPOINT }} --region ${{ secrets.ALIYUN_CYG_OSS_REGION }} cp -fr $src $dest
|
||||
done
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
workdir=$1
|
||||
initdir=$2
|
||||
|
||||
|
@ -35,9 +34,7 @@ after_helm_website(){
|
|||
}
|
||||
|
||||
save_return(){
|
||||
echo "复制文件到OSS $workdir $initdir"
|
||||
touch ${workdir}/ret-data
|
||||
echo "${workdir}/app&oss://cncfstack-test" > ${workdir}/ret-data
|
||||
echo "${workdir}/app&oss://cncfstack-helm" > ${workdir}/ret-data
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue