-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (65 loc) · 2.39 KB
/
release-dev.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
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
76
77
78
79
name: Release (Development version for A2)
on:
push:
tags: ["**"]
jobs:
run-tests:
if: false
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Set up Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: 20.15.0
cache: "npm"
- name: Install Node dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Test
run: npm run test
build-docker:
name: Build Docker Image
# needs: run-tests
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Assert matching Tag and Version
run: |
ABICUS_VERSION=$(jq -r '.version' package.json)
if [[ "v$ABICUS_VERSION" != "${{ github.ref_name }}" ]]; then
echo "Version in package.json does not match tag!"
echo "Version in package.json: \"v$ABICUS_VERSION\""
echo "Version given as tag: \"${{ github.ref_name }}\""
exit 1
fi
- name: Build
id: docker-build
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
with:
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
build-args: GIT_HASH=${{ github.sha }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
role-to-assume: arn:aws:iam::${{ secrets.UTILITY_ACCOUNT_ID }}:role/AbicusGithubActionsAccessRole
aws-region: eu-north-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076
- name: Tag Docker Image
run: docker tag ${{ steps.docker-build.outputs.imageid }} ${{ steps.login-ecr.outputs.registry }}/abicus:${{ github.ref_name }}
- name: Push Docker Image
run: docker push ${{ steps.login-ecr.outputs.registry }}/abicus:${{ github.ref_name }}