-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmanual-publish-feature-tests-to-dev.yaml
More file actions
51 lines (45 loc) · 1.5 KB
/
manual-publish-feature-tests-to-dev.yaml
File metadata and controls
51 lines (45 loc) · 1.5 KB
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
---
name: 'Publish Feature Tests to Dev'
on:
push:
paths:
- 'feature-tests/**'
- '.github/workflows/manual-publish-feature-tests-to-dev.yaml'
branches:
- main
workflow_dispatch:
inputs:
gitRef:
description: 'Input branch name, commit SHA, or tag'
required: true
type: string
default: main
permissions:
id-token: write
contents: read
jobs:
publish_artifacts:
name: 'Publish Feature Tests Image to Dev'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
with:
ref: ${{ inputs.gitRef }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # pin@6.0.0
with:
role-to-assume: ${{ secrets.DEV_TEST_GH_ACTIONS_ROLE_ARN }}
aws-region: eu-west-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@376925c9d111252e87ae59691e5a442dd100ef6a # pin@v2.1.3
- name: Build & Publish Docker Image as latest
working-directory: feature-tests/
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.DEV_TEST_ECR_REPOSITORY }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
docker push -a $ECR_REGISTRY/$ECR_REPOSITORY