Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 70f7499

Browse files
authored
Added Single Image Github Action (#556)
1 parent 0423fef commit 70f7499

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release Single Image
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
pipeline-argument:
6+
description: 'Argument to pass to pipeline'
7+
required: true
8+
release-key:
9+
description: 'Corresponding release.json key'
10+
required: true
11+
jobs:
12+
release-single-image:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v2
17+
- name: Setup Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.8'
21+
architecture: 'x64'
22+
23+
- uses: actions/cache@v2
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ hashFiles('requirements.txt') }}
27+
28+
- name: Install Python Dependencies
29+
run: pip install -r requirements.txt
30+
- name: Determine if release is needed
31+
id: release_status
32+
run: |
33+
OUTPUT=$(scripts/ci/determine_required_releases.py ${{ github.event.inputs.release-key }})
34+
echo "::set-output name=OUTPUT::$OUTPUT"
35+
36+
- name: Login to Quay.io
37+
uses: docker/login-action@v1
38+
with:
39+
registry: quay.io
40+
username: ${{ secrets.QUAY_USERNAME }}
41+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
42+
43+
- name: Publish Image To Quay
44+
if: steps.release_status.outputs.OUTPUT == 'unreleased'
45+
run: python pipeline.py --image-name ${{ github.event.inputs.pipeline-argument }} --release true
46+
env:
47+
MONGODB_COMMUNITY_CONFIG: "${{ github.workspace }}/scripts/ci/config.json"
48+
49+
- name: Add Supported Release
50+
if: steps.release_status.outputs.OUTPUT == 'unreleased'
51+
run: python scripts/ci/add_supported_release.py --image-name ${{ github.event.inputs.release-key }}
52+
env:
53+
ATLAS_DATABASE: "${{ secrets.ATLAS_DATABASE }}"
54+
ATLAS_CONNECTION_STRING: "${{ secrets.ATLAS_CONNECTION_STRING }}"

0 commit comments

Comments
 (0)