Skip to content

Commit f433386

Browse files
feat: trigger GHCR image publishing on main branch push (#1749)
* feat: trigger GHCR image publishing on main branch push * feat: limit auto-trigger to original repo Also reflects the new state to the docs --------- Co-authored-by: Marcelo Robert Santos <marcelo.santos@profusion.mobi>
1 parent 477a820 commit f433386

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/deploy-containers.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Publish GHCR Images
22

33
on:
4+
push:
5+
branches:
6+
- main
47
workflow_dispatch:
58

69
concurrency:
@@ -16,6 +19,7 @@ env:
1619

1720
jobs:
1821
build-and-push-backend:
22+
if: github.repository == 'kernelci/dashboard' || github.event_name == 'workflow_dispatch'
1923
runs-on: ubuntu-latest
2024
outputs:
2125
digest: ${{ steps.build.outputs.digest }}
@@ -47,6 +51,7 @@ jobs:
4751
${{ steps.meta.outputs.prefix }}/dashboard-backend:${{ github.sha }}
4852
4953
build-and-push-dashboard:
54+
if: github.repository == 'kernelci/dashboard' || github.event_name == 'workflow_dispatch'
5055
runs-on: ubuntu-latest
5156
outputs:
5257
digest: ${{ steps.build.outputs.digest }}
@@ -79,6 +84,7 @@ jobs:
7984
${{ steps.meta.outputs.prefix }}/dashboard-frontend:${{ github.sha }}
8085
8186
build-and-push-proxy:
87+
if: github.repository == 'kernelci/dashboard' || github.event_name == 'workflow_dispatch'
8288
runs-on: ubuntu-latest
8389
outputs:
8490
digest: ${{ steps.build.outputs.digest }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The workflow `.github/workflows/deploy-containers.yaml` publishes Docker images
145145
- `dashboard-frontend` (from `./dashboard/Dockerfile`)
146146
- `dashboard-proxy` (from `./proxy`)
147147

148-
This workflow is manual for now (`workflow_dispatch`) and pushes images to GHCR under `ghcr.io/<owner>/<repo>` with two tags for each image:
148+
This workflow is triggered on pushes to main (on the original repository) and also manually (`workflow_dispatch`) and pushes images to GHCR under `ghcr.io/<owner>/<repo>` with two tags for each image:
149149

150150
- `latest`
151151
- `${{ github.sha }}`

0 commit comments

Comments
 (0)