-
Notifications
You must be signed in to change notification settings - Fork 36
60 lines (59 loc) · 2.33 KB
/
vendor-app.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: vendor-application-images
on:
workflow_dispatch:
inputs:
application:
description: 'Application to vendor images for'
required: true
jobs:
vendor-plural:
name: Vendor application images ${{ github.event.inputs.application }}
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Install skopeo
run: |
sudo apt-get update
sudo apt-get install -y libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config
git clone https://github.com/pluralsh/skopeo.git
cd skopeo
make bin/skopeo
sudo make install-binary
cd ..
- uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::312272277431:role/github-actions/plural-artifacts-ecr
aws-region: us-east-1
role-session-name: PluralArtifacts
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: public
- uses: google-github-actions/auth@v1
with:
workload_identity_provider: 'projects/${{ secrets.GOOGLE_PROJECT_ID }}/locations/global/workloadIdentityPools/github/providers/github'
service_account: '[email protected]'
token_format: 'access_token'
create_credentials_file: true
- uses: google-github-actions/[email protected]
- name: Login to gcr
run: gcloud auth configure-docker -q
- name: Login to plural registry
uses: docker/login-action@v2
with:
registry: dkr.plural.sh
username: [email protected]
password: ${{ secrets.PLURAL_ACCESS_TOKEN }}
- name: "Vendor images to Plural"
continue-on-error: true
run: |
skopeo sync --keep-going --retry-times 5 --scoped --scoped-append-registry=false --all --src yaml --dest docker ${{ github.event.inputs.application }}/vendor_images.yaml dkr.plural.sh/${{ github.event.inputs.application }}
- name: "Vendor images to GCR"
continue-on-error: true
run: |
skopeo sync --keep-going --retry-times 5 --scoped --scoped-append-registry=false --all --src yaml --dest docker ${{ github.event.inputs.application }}/vendor_images.yaml gcr.io/pluralsh