-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (59 loc) · 2.04 KB
/
scheduled_update_check.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: Schedule update check
on:
schedule:
- cron: '0 0 * * *'
defaults:
run:
shell: bash
env:
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
TERM: dumb
ADMIN_EMAIL: ${{ secrets.ADMIN_EMAIL }}
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
ADMIN_USERNAME: ${{ secrets.ADMIN_USERNAME }}
# Needed because the default token is not supported to push.
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }}
TEST_SITE_NAME: ${{ secrets.TERMINUS_SITE }}
CI_BRANCH: ${{ github.ref }}
COMMIT_SHA: ${{ github.sha }}
CI_BUILD_NUMBER: ${{ github.run_number }}
DEFAULT_SITE: ${{ secrets.TERMINUS_SITE }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
GITHUB_OWNER: ${{ github.repository_owner }}
CI_PROJECT_NAME: ${{ github.repository }}
jobs:
scheduled_update_check:
container:
image: quay.io/pantheon-public/build-tools-ci:8.x-php7.4
options: --user root
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set bash_env env var
run: echo BASH_ENV=${RUNNER_TEMP}/bash_env.txt >> $GITHUB_ENV
- name: Cache bash_env.txt
uses: actions/cache@v3
env:
cache-name: cache-bash-env
with:
path: ${{ env.BASH_ENV }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_number }}
# Set TERMINUS_ENV and related environment variables.
# https://github.com/pantheon-systems/docker-build-tools-ci/blob/6.x/scripts/set-environment
- name: setup-environment-vars
run: |
/build-tools-ci/scripts/set-environment
- name: Authenticate with Terminus
run: terminus -n auth:login --machine-token="$TERMINUS_TOKEN"
- name: run composer lock updater
run: |
echo "$SSH_PRIVATE_KEY" > ../private.key
chmod 600 ../private.key
eval `ssh-agent -s`
ssh-add ../private.key
source $BASH_ENV
set -e && terminus project:clu $TERMINUS_SITE