-
Notifications
You must be signed in to change notification settings - Fork 26
48 lines (40 loc) · 1.17 KB
/
dispatch-worker-build.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
name: Build and release Custom Worker Tag
on:
workflow_dispatch:
inputs:
tag:
description: 'image tag'
required: true
type: string
permissions:
id-token: write
contents: read
jobs:
build_and_release_worker:
environment: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- 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: ${{ secrets.AWS_IAM_ROLE_GITHUB }}
aws-region: us-east-1
- name: Log in to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
id: login-ecr
with:
registry-type: public
mask-password: 'true'
- name: Build and push container image to Amazon ECR
uses: docker/build-push-action@v5
with:
file: ./docker/Dockerfile.worker
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/n4e0e1y0/beta9-worker:${{ inputs.tag }}
target: final
platforms: linux/amd64