Skip to content

Commit 90f22a6

Browse files
committed
Configure quay.io
1 parent 6e14633 commit 90f22a6

File tree

1 file changed

+17
-27
lines changed

1 file changed

+17
-27
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
name: Build
22

3-
env:
4-
REGISTRY: "ghcr.io"
5-
REGISTRY_USER: ${{ github.actor }}
6-
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
7-
83
on:
94
pull_request:
105
branches:
@@ -14,12 +9,6 @@ on:
149
- "main"
1510
workflow_dispatch:
1611

17-
permissions:
18-
contents: read
19-
packages: write
20-
id-token: write
21-
attestations: write
22-
2312
concurrency:
2413
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
2514
cancel-in-progress: true
@@ -30,36 +19,37 @@ jobs:
3019
steps:
3120
- name: Checkout
3221
uses: actions/checkout@v2
33-
22+
3423
- name: Setup Yarn
3524
uses: actions/setup-node@v2
3625
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"
4029

4130
- name: Build plugin
4231
run: make plugin-build
4332

4433
- name: Lint plugin
4534
continue-on-error: true
4635
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
4940
uses: redhat-actions/podman-login@v1
5041
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 }}
5445

5546
- name: Build plugin container
5647
shell: bash
5748
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
6550
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

Comments
 (0)