-
Notifications
You must be signed in to change notification settings - Fork 509
53 lines (48 loc) · 1.72 KB
/
release-single-image.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
name: Release Single Image
on:
workflow_dispatch:
inputs:
pipeline-argument:
description: 'Argument to pass to pipeline'
required: true
release-key:
description: 'Corresponding release.json key'
required: true
jobs:
release-single-image:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10.4'
architecture: 'x64'
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ hashFiles('requirements.txt') }}
- name: Install Python Dependencies
run: pip install -r requirements.txt
- name: Determine if release is needed
id: release_status
run: |
OUTPUT=$(scripts/ci/determine_required_releases.py ${{ github.event.inputs.release-key }})
echo "::set-output name=OUTPUT::$OUTPUT"
- name: Login to Quay.io
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
# template: .action_templates/steps/set-up-qemu.yaml
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Publish Image To Quay
if: steps.release_status.outputs.OUTPUT == 'unreleased'
run: python pipeline.py --image-name ${{ github.event.inputs.pipeline-argument }} --release
env:
MONGODB_COMMUNITY_CONFIG: "${{ github.workspace }}/scripts/ci/config.json"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"