This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
75 lines (61 loc) · 1.87 KB
/
merge_to_master.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
66
67
68
69
70
71
72
73
74
75
# CI stages to execute against master branch on PR merge
name: TestFM - IMAGE
on:
push:
branches:
- master
jobs:
codechecks:
name: Code Quality
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
steps:
- name: Checkout TestFM
uses: actions/checkout@v3
- name: Set Up Python-${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
sudo apt update ; sudo apt-get install -y python-dev
pip install -r requirements.txt
- name: Pre Commit Checks
uses: pre-commit/[email protected]
- name: Make Docstrings
run: make test-docstrings
testfm_container:
needs: codechecks
name: Update TestFM container image on Quay.
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get image tag
id: image_tag
run: |
echo -n ::set-output name=IMAGE_TAG::
TAG="${GITHUB_REF##*/}"
if [ "${TAG}" == "master" ]; then
TAG="latest"
fi
echo "${TAG}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay Container Registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.QUAY_SERVER }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push image to Quay
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.QUAY_SERVER }}/${{ secrets.QUAY_NAMESPACE }}/testfm:${{ steps.image_tag.outputs.IMAGE_TAG }}