forked from pavlospt/render-template
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.35 KB
/
main.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
name: main
on:
push:
branches:
- main
env:
DOCKER_IMAGE_REPO: bluegroundltd/render-template
PUBLIC_ECR_REGISTRY: public.ecr.aws/l2j5o5b6
jobs:
main:
runs-on: arc-runner-set
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::489098123993:role/github-actions-assumable-role
aws-region: eu-west-1
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
- name: Build & push to public ECR
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.PUBLIC_ECR_REGISTRY}}/${{ env.DOCKER_IMAGE_REPO }}:${{ steps.short-sha.outputs.sha }}
- name: Test action
uses: ./ # Uses an action in the root directory
id: render
with:
template: ./testdata/template.txt
vars: |
name: world
- name: Get `result` output
run: echo "${{ steps.render.outputs.result }}"