1
1
name : Build
2
2
3
- env :
4
- REGISTRY : " ghcr.io"
5
- REGISTRY_USER : ${{ github.actor }}
6
- REGISTRY_PASSWORD : ${{ secrets.GITHUB_TOKEN }}
7
-
8
3
on :
9
4
pull_request :
10
5
branches :
14
9
- " main"
15
10
workflow_dispatch :
16
11
17
- permissions :
18
- contents : read
19
- packages : write
20
- id-token : write
21
- attestations : write
22
-
23
12
concurrency :
24
13
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
25
14
cancel-in-progress : true
@@ -30,36 +19,37 @@ jobs:
30
19
steps :
31
20
- name : Checkout
32
21
uses : actions/checkout@v2
33
-
22
+
34
23
- name : Setup Yarn
35
24
uses : actions/setup-node@v2
36
25
with :
37
- node-version : ' 20 '
38
- cache : ' yarn'
39
- cache-dependency-path : ' plugin/yarn.lock'
26
+ node-version : " 20 "
27
+ cache : " yarn"
28
+ cache-dependency-path : " plugin/yarn.lock"
40
29
41
30
- name : Build plugin
42
31
run : make plugin-build
43
32
44
33
- name : Lint plugin
45
34
continue-on-error : true
46
35
run : make plugin-lint
47
-
48
- - name : Log in to ghcr.io
36
+
37
+ - name : Log in to registry
38
+ if : github.ref == 'refs/heads/main'
39
+ id : login-registry
49
40
uses : redhat-actions/podman-login@v1
50
41
with :
51
- registry : ${{ env.REGISTRY }}
52
- username : ${{ env.REGISTRY_USER }}
53
- password : ${{ env.REGISTRY_PASSWORD }}
42
+ registry : quay.io
43
+ username : ${{ secrets.QUAY_USERNAME }}
44
+ password : ${{ secrets.QUAY_ROBOT_TOKEN }}
54
45
55
46
- name : Build plugin container
56
47
shell : bash
57
48
run : |
58
- make CUSTOM_PLUGIN_IMAGE=${{ env.REGISTRY }}/camel-tooling/camel-openshift-console-plugin plugin-image
59
-
60
- # - name: Push plugin container
61
- # shell: bash
62
- # run: |
63
- # make CUSTOM_PLUGIN_IMAGE=${{ env.REGISTRY }}/camel-tooling/camel-openshift-console-plugin push-plugin
64
-
49
+ make CUSTOM_PLUGIN_IMAGE=quay.io/camel-tooling/camel-openshift-console-plugin plugin-image
65
50
51
+ - name : Push plugin container
52
+ if : github.ref == 'refs/heads/main'
53
+ shell : bash
54
+ run : |
55
+ make CUSTOM_PLUGIN_IMAGE=quay.io/camel-tooling/camel-openshift-console-plugin push-plugin
0 commit comments