-
Notifications
You must be signed in to change notification settings - Fork 70
60 lines (52 loc) · 1.8 KB
/
aws-s3-publish.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
56
57
58
59
60
name: Build and publish aws s3 dependency
on:
workflow_dispatch:
inputs:
image_tag:
description: "The tag to apply to the AWS SDK image. Previously this was the AWS SDK release version (e.g. 1.8.177)"
required: true
type: string
aws_release:
description: "The aws s3 version to build and publish (e.g. 1.8.177)"
required: true
type: string
os:
description: "Which os to use. Currently only supports ubuntu"
required: false
type: str
default: "ubuntu"
os_release:
description: "The os version to use (e.g. 20.04 for ubuntu)"
required: false
type: str
default: "20.04"
env:
REGISTRY: ghcr.io
jobs:
ubuntu:
runs-on: [self-hosted, e2e_test_runner]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: |
docker build \
--build-arg os_release=${{ inputs.os_release }} \
--build-arg aws_release=${{ inputs.aws_release }} \
-t "fbpcf/${{ inputs.os }}-aws-s3-core:${{ inputs.image_tag }}" \
-f "docker/aws-s3-core/Dockerfile.${{ inputs.os }}" .
- name: Tag image
run: |
docker tag fbpcf/${{ inputs.os }}-aws-s3-core:${{ inputs.image_tag }} \
${{ env.REGISTRY }}/${{ github.repository }}/${{ inputs.os }}-aws-s3-core:${{ inputs.image_tag }}
- name: Publish image
run: |
docker push --all-tags ${{ env.REGISTRY }}/${{ github.repository }}/${{ inputs.os }}-aws-s3-core