Repository navigation
77 lines (65 loc) · 2.16 KB
/
Copy pathplugin-installer.yaml
File metadata and controls
77 lines (65 loc) · 2.16 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Plugin Installer CI
on:
push:
branches:
- main
- 'release-[2-9]+.[0-9]+'
paths:
- 'plugin-installer/**'
- 'pkg/fetcher/**'
- 'cmd/plugin-fetch/**'
- '.github/workflows/plugin-installer.yaml'
pull_request:
branches:
- main
paths:
- 'plugin-installer/**'
- 'pkg/fetcher/**'
- 'cmd/plugin-fetch/**'
- '.github/workflows/plugin-installer.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ${{ vars.REGISTRY }}
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
- name: Run tests
run: make dp-installer-test
- name: Build image (verify Dockerfile)
run: docker build -f plugin-installer/Dockerfile .
build:
name: Build image
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up QEMU
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4
- name: Set up Docker Buildx
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- name: Login to registry (${{ env.REGISTRY }})
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push multiplatform image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: make dp-installer-buildx