-
Notifications
You must be signed in to change notification settings - Fork 156
55 lines (46 loc) · 1.43 KB
/
promote_binaries.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
50
51
52
53
54
55
name: Promote Binaries
on:
workflow_dispatch:
inputs:
existing_tag:
description: 'The existing tag/s3 subfolder of the binaries'
required: true
type: string
new_tag:
description: 'The new tag/s3 subfolder of the binaries'
required: true
type: string
aws_region:
description: 'The AWS region where the bucket is defined'
required: false
type: string
default: us-west-2
tracker_hash:
description: '[Internal usage] Used for tracking workflow job status within Meta infra'
required: false
type: str
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
- name: Print Tracker Hash
run: echo ${{ github.event.inputs.tracker_hash}}
- uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ github.event.inputs.aws_region }}
- name: Promote Binaries
run: |
./promote_scripts/promote_binaries.sh ${{ github.event.inputs.existing_tag }} ${{ github.event.inputs.new_tag }} < <(yes 'yes')