Skip to content

Commit cfc355c

Browse files
committed
Revert dev build workflow change
Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
1 parent a44d65a commit cfc355c

1 file changed

Lines changed: 15 additions & 31 deletions

File tree

.github/workflows/image-build-push-dev.yaml

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,34 @@ on:
88
- "docs/**"
99
- "release/**"
1010
- "OWNERS"
11-
pull_request_target:
12-
branches:
13-
- main
14-
paths-ignore:
15-
- "docs/**"
16-
- "release/**"
17-
- "OWNERS"
18-
issue_comment:
19-
types: [created]
11+
workflow_dispatch:
2012

2113
env:
22-
REGISTRY: ${{ github.event_name == 'pull_request' && 'ghcr.io' || 'docker.io' }}
23-
ORG: ${{ github.event_name == 'pull_request' && github.repository || 'nephio' }}
14+
REGISTRY: docker.io
15+
ORG: nephio
2416

2517
permissions:
2618
contents: read
27-
packages: write
2819

2920
jobs:
3021
build-and-push-image:
31-
if: |
32-
github.repository_owner == 'nephio-project' && (
33-
github.event_name != 'issue_comment' ||
34-
(github.event.issue.pull_request && contains(github.event.comment.body, '/rebuild'))
35-
)
22+
if: github.repository_owner == 'nephio-project'
3623
runs-on: ubuntu-latest
37-
permissions:
38-
contents: read
39-
packages: write
4024
strategy:
4125
fail-fast: false
4226
matrix:
4327
include:
4428
- dockerfile: ./build/Dockerfile
45-
image: ${{ github.event_name == 'pull_request' && 'ghcr.io' || 'docker.io' }}/${{ github.event_name == 'pull_request' && github.repository || 'nephio' }}/porch-server
29+
image: docker.io/nephio/porch-server
4630
- dockerfile: ./controllers/Dockerfile
47-
image: ${{ github.event_name == 'pull_request' && 'ghcr.io' || 'docker.io' }}/${{ github.event_name == 'pull_request' && github.repository || 'nephio' }}/porch-controllers
31+
image: docker.io/nephio/porch-controllers
4832
- dockerfile: ./func/Dockerfile
49-
image: ${{ github.event_name == 'pull_request' && 'ghcr.io' || 'docker.io' }}/${{ github.event_name == 'pull_request' && github.repository || 'nephio' }}/porch-function-runner
33+
image: docker.io/nephio/porch-function-runner
5034
- dockerfile: ./func/Dockerfile-wrapperserver
51-
image: ${{ github.event_name == 'pull_request' && 'ghcr.io' || 'docker.io' }}/${{ github.event_name == 'pull_request' && github.repository || 'nephio' }}/porch-wrapper-server
52-
35+
image: docker.io/nephio/porch-wrapper-server
36+
permissions:
37+
contents: read
38+
packages: write
5339

5440
steps:
5541
- name: Harden Runner
@@ -64,8 +50,8 @@ jobs:
6450
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
6551
with:
6652
registry: ${{ env.REGISTRY }}
67-
username: ${{ github.event_name == 'pull_request' && github.actor || vars.DOCKERHUB_USERNAME }}
68-
password: ${{ github.event_name == 'pull_request' && secrets.GITHUB_TOKEN || secrets.DOCKERHUB_TOKEN }}
53+
username: ${{ vars.DOCKERHUB_USERNAME }}
54+
password: ${{ secrets.DOCKERHUB_TOKEN }}
6955

7056
- name: Set up Docker Buildx
7157
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
@@ -85,9 +71,7 @@ jobs:
8571
file: ${{ matrix.dockerfile }}
8672
push: true
8773
tags: |
88-
${{ matrix.image }}:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || (github.ref_name == 'main' && 'latest' || github.ref_name) }}
74+
${{ matrix.image }}:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
8975
labels: ${{ steps.meta.outputs.labels }}
90-
cache-from: type=gha
91-
cache-to: type=gha,mode=max
92-
no-cache: ${{ contains(github.event.comment.body, '/rebuild --no-cache') }}
76+
no-cache: true
9377
sbom: true

0 commit comments

Comments
 (0)