-
Notifications
You must be signed in to change notification settings - Fork 26
49 lines (46 loc) · 1.69 KB
/
create-release.yaml
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
name: Release Aperture
on:
workflow_dispatch:
inputs:
version:
required: true
type: string
concurrency:
cancel-in-progress: false
group: ${{ github.repository }}-release-aperture-${{ inputs.version }}
jobs:
create-release:
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Configure Git Name and Email
run: |
git config --global user.name "FluxNinja Ops"
git config --global user.email ops@fluxninja.com
- name: Store deployment keys under pre-defined names
run: |
SSH_KEY_PATH=$HOME/.ssh/id_rsa_$(echo ${{ vars.DEPLOYMENT_KEY_CLOUD_RO_MD5 }} | tr -d ':')
[ ! -d $HOME/.ssh/ ] && mkdir $HOME/.ssh/
echo "${{ secrets.DEPLOYMENT_KEY_CLOUD_RO }}" | base64 -d > $SSH_KEY_PATH
chmod 0600 $SSH_KEY_PATH
- name: Install opsninja library
run: |
export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_$(echo ${{ vars.DEPLOYMENT_KEY_CLOUD_RO_MD5 }} | tr -d ':')"
export SSH_AUTH_SOCK=""
# Bust asdf cache as our opsninja version is always 0.0.0
pip uninstall -y opsninja
pip install 'git+ssh://git@github.com/fluxninja/cloud@main#egg=opsninja&subdirectory=ops/apps/opsninja/'
- name: Prepare for the release
env:
LOGURU_LEVEL: TRACE
GH_TOKEN: ${{ github.token }}
run: |
fn release release-aperture --version ${{ inputs.version }} --repo-path ./ --message 'Releasing version ${{ inputs.version }}'