-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.62 KB
/
export_config.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
name: export_config
on: workflow_call
env:
REGISTRY: ghcr.io
jobs:
export_config:
name: export_config
if: startsWith(github.ref, 'refs/heads/automation/')
runs-on: biggy
container:
image: ghcr.io/dpc-sdp/bay/ci-builder:5.x
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Log into registry ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Uncomment database snapshot environment variable
run: |
sed -i 's|# DB_IMAGE_SNAPSHOT|DB_IMAGE_SNAPSHOT|' .env
- name: Configure Git
run: |
git config --global user.email "${{ secrets.DEPLOY_USER_EMAIL }}" && git config --global user.name "${{ secrets.DEPLOY_USER_NAME }}"
# GitHub Actions does not support cloning to a custom path.
- name: Copy repo
run: |
chown -R $(id -u):$(id -g) $PWD
cp -R ${GITHUB_WORKSPACE} /app
- name: Run export script
run: |
cd /app
/app/.circleci/export-config.sh
- name: Get the release branch
run: |
CURRENT_GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo RELEASE_GIT_BRANCH="${CURRENT_GIT_BRANCH//automation/release}" >> $GITHUB_ENV
- name: Manually run build workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: build
repo: ${{ github.repository }}
ref: ${{ env.RELEASE_GIT_BRANCH }}