-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (44 loc) · 1.4 KB
/
updateMeta.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
name: Update meta
on:
schedule:
- cron: '0 * * * *' # every hour
env:
TZ: Asia/Hong_Kong
FORCE_COLOR: 1
EARTHLY_STRICT: "true"
EARTHLY_REMOTE_CACHE: "ghcr.io/giffon/charleywong_cache:master_devcontainer_workspace"
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: meta
fetch-depth: 0
- uses: earthly/actions-setup@v1
with:
version: "0.7.11"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Create .envrc
run: |
cat > .envrc <<EOT
export FACEBOOK_TOKEN="$FACEBOOK_TOKEN"
EOT
env:
FACEBOOK_TOKEN: ${{ secrets.FACEBOOK_TOKEN }}
- run: earthly +syncFacebook
env:
EARTHLY_SECRET_FILES: envrc=.envrc
- run: earthly +git.js
- name: Import gpg key
run: |
echo "${#CBCA760DC1170A9B}"
echo "$CBCA760DC1170A9B" | gpg --import
env:
CBCA760DC1170A9B: ${{ secrets.CBCA760DC1170A9B }}
- run: node git.js rebase-commit-push "Charley Wong's bot <charleywong-bot@giffon.io>" "CBCA760DC1170A9B!" "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/giffon/charleywong.git" meta
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FACEBOOK_TOKEN: ${{ secrets.FACEBOOK_TOKEN }}