This repository has been archived by the owner on Mar 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (61 loc) · 1.99 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Release
on:
pull_request:
types: [closed]
branches:
- main
- 'quest_solution/**'
jobs:
backup-repo:
name: Backup repo
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M')"
- name: Delete previous backup repo
id: delete_previous_repo
uses: octokit/[email protected]
with:
route: DELETE /repos/{owner}/{repo}
owner: trywilco
repo: Anythink-Market-Base-Previous-Version
env:
GITHUB_TOKEN: ${{ secrets.GH_WRITE_TOKEN }}
- name: Create new backup
id: generate_previous_repo
uses: octokit/[email protected]
with:
route: POST /repos/{template_owner}/{template_repo}/generate
template_owner: trywilco
template_repo: Anythink-Market-Base
owner: trywilco
name: Anythink-Market-Base-Previous-Version
include_all_branches: true
private: true
description: Anythink-Market-Base automatic backup, created at ${{ steps.date.outputs.date }}
env:
GITHUB_TOKEN: ${{ secrets.GH_WRITE_TOKEN }}
update-quest-solution-branches:
name: Update quest solution branches
needs: backup-repo
runs-on: ubuntu-latest
defaults:
run:
working-directory: .wilco-helpers
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all git history with branches
token: ${{ secrets.GH_WRITE_TOKEN }}
- name: Setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Update quest solution branches
uses: actions/setup-node@v2
with:
node-version: "14"
- run: yarn install
- run: API_SERVER_TOKEN=${{ secrets.API_SERVER_TOKEN }} node scripts/update_child_branches.js --repoPath=. --branch=main --forcePush=true