Skip to content

Commit 9fa8918

Browse files
authored
Merge pull request #31 from mconf/ci-portal-updates-for-dockerfile
[OPS-985] Portal updates for dockerfile
2 parents fc78422 + 3fb880b commit 9fa8918

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

.github/workflows/all-build-push-image.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
required: false
2626
type: string
2727
default: 'linux/amd64'
28+
build_target:
29+
description: 'Docker build target stage (optional, defaults to last stage)'
30+
required: false
31+
type: string
32+
default: ''
2833
runs-on:
2934
type: string
3035
required: false
@@ -105,6 +110,7 @@ jobs:
105110
push: true
106111
tags: ${{ steps.meta.outputs.tags }}
107112
labels: ${{ steps.meta.outputs.labels }}
113+
target: ${{ inputs.build_target }}
108114
cache-from: |
109115
type=gha,scope=${{ inputs.image_name }}
110116
type=registry,ref=${{ inputs.registry }}/${{ inputs.organization }}/${{ inputs.image_name }}:buildcache,image-manifest=true

.github/workflows/portal-ruby-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ jobs:
2929
run: bundle exec rubocop -l -f github --config .rubocop.yml
3030
- name: Lint HAML files
3131
run: bundle exec haml-lint -c .haml-lint.yml app/views
32+
- name: Lint Dockerfile
33+
uses: hadolint/hadolint-action@v3.3.0
34+
with:
35+
dockerfile: Dockerfile

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ Workflows may require the following secrets (configured in your repository):
136136
- `SSH_PRIVATE_KEY`: SSH key for accessing private Git repositories
137137
- `HARBOR_USERNAME`: Harbor registry username
138138
- `HARBOR_PASSWORD`: Harbor registry password
139+
- `DOCKERHUB_USERNAME`: DockerHub username
139140
- `DOCKERHUB_PASSWORD`: DockerHub password
140141
- `REGISTRY_ACCESS_TOKEN`: DockerHub access token for pushing images (will be deprecated in favor of `DOCKERHUB_PASSWORD`)
141142
- `TRIVY_EXPLORER_AUTH_TOKEN`: Authentication for Trivy Explorer

examples/all-build-push-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
registry: registry.example.com
1818
# dockerfile_path (optional): Path to Dockerfile (default: ./Dockerfile)
1919
# platforms (optional): Target platforms (default: linux/amd64)
20+
# build_target (optional): Docker build target stage (default: last stage)
2021
# runs-on (optional): Runner to use (default: ["self-hosted", "ubuntu-22.04"])
2122
secrets: inherit
2223
# Required secrets:

0 commit comments

Comments
 (0)