Skip to content

Commit

Permalink
ciconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaba committed Nov 18, 2023
1 parent 36af179 commit bb088c7
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/.touch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
393
10 changes: 6 additions & 4 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
{
"uses" : "actions/checkout@v2",
"with" : {
"token" : "${{ secrets.GH_ACCESS_TOKEN }}"
"fetch-depth" : 0,
"ref" : "master",
"ssh-key" : "${{ secrets.GH_GIT_KEY }}"
}
},
{
"run" : "git config --global user.email \u0022temp@github.test\u0022"
"run" : "git config --global user.name \u0022GitHub Actions\u0022"
},
{
"run" : "git config --global user.name \u0022GitHub Actions\u0022"
"run" : "git config --global user.email \u0022temp@github.test\u0022"
},
{
"run" : "make deps"
Expand All @@ -35,7 +37,7 @@
"on" : {
"schedule" : [
{
"cron" : "40 13 * * *"
"cron" : "2 20 * * *"
}
]
}
Expand Down
67 changes: 52 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,33 @@
"needs" : [
"test"
],
"permissions" : {
"contents" : "write"
},
"runs-on" : "ubuntu-latest",
"steps" : [
{
"env" : {
"GH_ACCESS_TOKEN" : "${{ secrets.GH_ACCESS_TOKEN }}"
},
"run" : "curl -f -s -S --request POST --header \u0022Authorization:token $GH_ACCESS_TOKEN\u0022 --header \u0022Content-Type:application/json\u0022 --data-binary \u0022{\u005C\u0022base\u005C\u0022:\u005C\u0022master\u005C\u0022,\u005C\u0022head\u005C\u0022:\u005C\u0022$GITHUB_SHA\u005C\u0022,\u005C\u0022commit_message\u005C\u0022:\u005C\u0022auto-merge $GITHUB_REF into master\u005C\u0022}\u0022 \u0022https://api.github.com/repos/$GITHUB_REPOSITORY/merges\u0022"
"uses" : "actions/checkout@v2",
"with" : {
"fetch-depth" : 0,
"ref" : "master",
"ssh-key" : "${{ secrets.GH_GIT_KEY }}"
}
},
{
"run" : "git config --global user.name \u0022GitHub Actions\u0022"
},
{
"run" : "git config --global user.email \u0022temp@github.test\u0022"
},
{
"run" : "git fetch --unshallow origin master || git fetch origin master"
},
{
"run" : "git checkout master || git checkout -b master origin/master"
},
{
"run" : "git merge -m \u0022auto-merge $GITHUB_REF ($GITHUB_SHA) into master\u0022 $GITHUB_SHA"
},
{
"run" : "git push origin master"
},
{
"env" : {
Expand All @@ -29,16 +46,33 @@
"needs" : [
"test"
],
"permissions" : {
"contents" : "write"
},
"runs-on" : "ubuntu-latest",
"steps" : [
{
"env" : {
"GH_ACCESS_TOKEN" : "${{ secrets.GH_ACCESS_TOKEN }}"
},
"run" : "curl -f -s -S --request POST --header \u0022Authorization:token $GH_ACCESS_TOKEN\u0022 --header \u0022Content-Type:application/json\u0022 --data-binary \u0022{\u005C\u0022base\u005C\u0022:\u005C\u0022master\u005C\u0022,\u005C\u0022head\u005C\u0022:\u005C\u0022$GITHUB_SHA\u005C\u0022,\u005C\u0022commit_message\u005C\u0022:\u005C\u0022auto-merge $GITHUB_REF into master\u005C\u0022}\u0022 \u0022https://api.github.com/repos/$GITHUB_REPOSITORY/merges\u0022"
"uses" : "actions/checkout@v2",
"with" : {
"fetch-depth" : 0,
"ref" : "master",
"ssh-key" : "${{ secrets.GH_GIT_KEY }}"
}
},
{
"run" : "git config --global user.name \u0022GitHub Actions\u0022"
},
{
"run" : "git config --global user.email \u0022temp@github.test\u0022"
},
{
"run" : "git fetch --unshallow origin master || git fetch origin master"
},
{
"run" : "git checkout master || git checkout -b master origin/master"
},
{
"run" : "git merge -m \u0022auto-merge $GITHUB_REF ($GITHUB_SHA) into master\u0022 $GITHUB_SHA"
},
{
"run" : "git push origin master"
},
{
"env" : {
Expand All @@ -57,7 +91,10 @@
"runs-on" : "ubuntu-latest",
"steps" : [
{
"uses" : "actions/checkout@v2"
"uses" : "actions/checkout@v2",
"with" : {
"ssh-key" : "${{ secrets.GH_GIT_KEY }}"
}
},
{
"run" : "mkdir -p $CIRCLE_ARTIFACTS"
Expand Down

0 comments on commit bb088c7

Please sign in to comment.