-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (53 loc) · 1.74 KB
/
manual_release.yml
File metadata and controls
56 lines (53 loc) · 1.74 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
52
53
54
55
56
name: Build and Release to ECR and ghcr.io
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build and release'
required: true
default: 'master'
tag:
description: 'Tag to build and release'
required: true
env:
IMAGE_NAME: ${{ secrets.EWX_WORKER_NODE_SERVER }}
AWS_REGION: us-east-1
jobs:
build-and-push:
runs-on: 'ubuntu-latest'
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
mask-aws-account-id: true
- name: Log in to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io/${{ github.repository }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}
ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}