generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 16
83 lines (68 loc) · 3.25 KB
/
push-main.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: push-ci-images
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build-push-image:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: '1.20'
check-latest: true
cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1
- uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
- uses: anchore/sbom-action/download-syft@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
- uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0
with:
install-only: true
- name: run goreleaser-snapshot
run: |
make goreleaser-snapshot
docker images
docker run falcosecurity/falcosidekick-ui:latest-amd64 -v
docker run public.ecr.aws/falcosecurity/falcosidekick-ui:latest-amd64 -v
env:
GOPATH: /home/runner/go
# Push images to DockerHUB
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_SECRET }}
- name: Push images to Dockerhub
run: |
docker push falcosecurity/falcosidekick-ui:latest-amd64
docker push falcosecurity/falcosidekick-ui:latest-arm64
docker push falcosecurity/falcosidekick-ui:latest-armv7
docker manifest create --amend falcosecurity/falcosidekick-ui:latest falcosecurity/falcosidekick-ui:latest-amd64 \
falcosecurity/falcosidekick-ui:latest-arm64 falcosecurity/falcosidekick-ui:latest-armv7
docker manifest push --purge falcosecurity/falcosidekick-ui:latest
# Push images to AWS Public ECR
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with:
role-to-assume: arn:aws:iam::292999226676:role/github_actions-falcosidekick-ecr
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@fc3959cb4cf5a821ab7a5a636ea4f1e855b05180 # v1.6.2
with:
registry-type: public
- run: |
docker push public.ecr.aws/falcosecurity/falcosidekick-ui:latest-amd64
docker push public.ecr.aws/falcosecurity/falcosidekick-ui:latest-arm64
docker push public.ecr.aws/falcosecurity/falcosidekick-ui:latest-armv7
docker manifest create --amend public.ecr.aws/falcosecurity/falcosidekick-ui:latest public.ecr.aws/falcosecurity/falcosidekick-ui:latest-amd64 \
public.ecr.aws/falcosecurity/falcosidekick-ui:latest-arm64 public.ecr.aws/falcosecurity/falcosidekick-ui:latest-armv7
docker manifest push --purge public.ecr.aws/falcosecurity/falcosidekick-ui:latest