Skip to content

Commit b981f39

Browse files
committed
Revert "Merge branch 'op-number-constraint' of https://github.com/coronasafe/care into op-number-constraint"
This reverts commit cfe9962, reversing changes made to 4e80be9.
1 parent cfe9962 commit b981f39

File tree

9 files changed

+156
-15
lines changed

9 files changed

+156
-15
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Branch based deploy
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches:
8+
- abdm-m3
9+
- hcx_refactors
10+
paths-ignore:
11+
- "docs/**"
12+
13+
jobs:
14+
build-image:
15+
name: Build & Push Staging to container registries
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Docker meta
21+
id: meta
22+
uses: docker/metadata-action@v4
23+
with:
24+
images: |
25+
ghcr.io/${{ github.repository }}
26+
tags: |
27+
type=raw,value=${{ github.ref_name}}-${{ github.run_number }}
28+
type=raw,value=${{ github.ref_name}}
29+
30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v3
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Login to GitHub Container Registry
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Cache Docker layers
44+
uses: actions/cache@v3
45+
with:
46+
path: /tmp/.buildx-cache
47+
key: ${{ runner.os }}-buildx-${{ hashFiles('Pipfile.lock', 'docker/prod.Dockerfile') }}
48+
restore-keys: |
49+
${{ runner.os }}-buildx-
50+
51+
- name: Build image
52+
uses: docker/build-push-action@v5
53+
with:
54+
context: .
55+
file: docker/prod.Dockerfile
56+
push: true
57+
provenance: false
58+
platforms: linux/amd64,linux/arm64
59+
tags: ${{ steps.meta.outputs.tags }}
60+
build-args: |
61+
APP_VERSION=${{ github.sha }}
62+
cache-from: type=local,src=/tmp/.buildx-cache
63+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
64+
65+
- name: Create Sentry release
66+
uses: getsentry/action-release@v1
67+
env:
68+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
69+
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
70+
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
71+
with:
72+
version: ${{ github.sha }}
73+
74+
- name: Move cache
75+
run: |
76+
rm -rf /tmp/.buildx-cache
77+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Lambda Deployment
2+
3+
on:
4+
workflow_dispatch:
5+
6+
pull_request:
7+
branches:
8+
- devops/lambda-changes
9+
paths-ignore:
10+
- "docs/**"
11+
12+
jobs:
13+
14+
build-image:
15+
name: Build & Push Staging to container registries
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Docker meta
21+
id: meta
22+
uses: docker/metadata-action@v4
23+
with:
24+
images: |
25+
ghcr.io/${{ github.repository }}
26+
tags: |
27+
type=raw,value=${{ github.head_ref}}-${{ github.run_number }}
28+
type=raw,value=${{ github.head_ref}}
29+
30+
flavor: |
31+
latest=true
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v2
35+
36+
- name: Cache Docker layers
37+
uses: actions/cache@v3
38+
with:
39+
path: /tmp/.buildx-cache
40+
key: ${{ runner.os }}-buildx-${{ hashFiles('r*/base.txt', 'r*/production.txt', 'Dockerfile') }}
41+
restore-keys: |
42+
${{ runner.os }}-buildx-
43+
44+
- name: Login to GitHub Container Registry
45+
uses: docker/login-action@v2
46+
with:
47+
registry: ghcr.io
48+
username: ${{ github.actor }}
49+
password: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Build image
52+
uses: docker/build-push-action@v3
53+
with:
54+
context: .
55+
file: lambda_Dockerfile
56+
push: true
57+
tags: ${{ steps.meta.outputs.tags }}
58+
cache-from: type=local,src=/tmp/.buildx-cache
59+
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
60+
61+
- name: Move cache
62+
run: |
63+
rm -rf /tmp/.buildx-cache
64+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

.github/workflows/deploy.yml renamed to .github/workflows/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ env:
3333

3434
jobs:
3535
test:
36-
uses: ./.github/workflows/reusable-test.yml
36+
uses: ./.github/workflows/test-base.yml
3737

3838
build:
3939
needs: test

.github/workflows/docs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: Build docs
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v3
2323

24-
- uses: actions/setup-python@v5
24+
- uses: actions/setup-python@v3
2525
with:
2626
python-version: "3.11"
2727
cache: 'pipenv'
28+
cache-dependency-path: |
29+
Pipfile.lock
2830
2931
- name: Install pipenv
3032
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
@@ -51,7 +53,7 @@ jobs:
5153
permissions:
5254
contents: write
5355
steps:
54-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v3
5557

5658
- name: Download sphinx documentation
5759
uses: actions/download-artifact@v3
@@ -64,7 +66,7 @@ jobs:
6466
touch build/.nojekyll
6567
6668
- name: Deploy docs
67-
uses: JamesIves/github-pages-deploy-action@v4
69+
uses: JamesIves/github-pages-deploy-action@v4.4.3
6870
with:
6971
branch: gh-pages
7072
folder: build

.github/workflows/linter.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ on:
77
- staging
88
merge_group:
99

10-
permissions: { }
11-
1210
jobs:
1311
build:
12+
if: github.repository == 'coronasafe/care'
1413
name: Lint Code Base
1514
runs-on: ubuntu-latest
1615
permissions:
@@ -20,13 +19,14 @@ jobs:
2019

2120
steps:
2221
- name: Checkout Code
23-
uses: actions/checkout@v4
22+
uses: actions/checkout@v3
2423
with:
2524
fetch-depth: 0
2625

2726
- name: Lint Code Base
28-
uses: super-linter/super-linter/slim@v6
27+
uses: github/super-linter/slim@v5
2928
env:
29+
DEFAULT_BRANCH: develop
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
VALIDATE_ALL_CODEBASE: false
3232
VALIDATE_PYTHON_BLACK: true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Release on Push
1414
runs-on: ubuntu-22.04
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v3
1717
with:
1818
fetch-depth: 0 # Necessary to fetch all tags
1919

.github/workflows/reusable-test.yml renamed to .github/workflows/test-base.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ jobs:
5050
run: make test-coverage
5151

5252
- name: Upload coverage report
53-
uses: codecov/codecov-action@v4
54-
env:
55-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
53+
uses: codecov/codecov-action@v3
5654

5755
- name: Move cache
5856
run: |

.github/workflows/test-merge-queue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ on:
55

66
jobs:
77
test:
8-
uses: ./.github/workflows/reusable-test.yml
8+
uses: ./.github/workflows/test-base.yml

.github/workflows/test-pull-request.yml renamed to .github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ concurrency:
99

1010
jobs:
1111
test:
12-
uses: ./.github/workflows/reusable-test.yml
12+
uses: ./.github/workflows/test-base.yml

0 commit comments

Comments
 (0)