Skip to content

Commit

Permalink
Use IMAGE_REGISTRY var for build image registry
Browse files Browse the repository at this point in the history
The registry for the build image is no longer hard-coded but using the
variable IMAGE_REGISTRY.
  • Loading branch information
timopollmeier authored and bjoernricks committed Mar 6, 2024
1 parent 90ea769 commit 74d3808
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .docker/prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ARG VERSION=edge
ARG GVM_LIBS_VERSION=oldstable
ARG DEBIAN_FRONTEND=noninteractive
ARG IMAGE_REGISTRY=ghcr.io

FROM ghcr.io/greenbone/gvmd-build:${VERSION} as builder
FROM ${IMAGE_REGISTRY}/greenbone/gvmd-build:${VERSION} as builder

COPY . /source
WORKDIR /source
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
scan-build:
name: scan-build (clang static analyzer)
runs-on: ubuntu-latest
container: gchr.io/greenbone/gvmd-build:stable
container: ${{ vars.IMAGE_REGISTRY }}/greenbone/gvmd-build:stable
steps:
- name: Check out gvmd
uses: actions/checkout@v4
Expand All @@ -46,7 +46,7 @@ jobs:
test-units:
name: Unit Tests
runs-on: ubuntu-latest
container: gchr.io/greenbone/gvmd-build:stable
container: ${{ vars.IMAGE_REGISTRY }}/greenbone/gvmd-build:stable
steps:
- name: Check out gvmd
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: gchr.io/${{ github.repository }}-build
images: ${{ vars.IMAGE_REGISTRY }}/${{ github.repository }}-build
labels: |
org.opencontainers.image.vendor=Greenbone
org.opencontainers.image.base.name=greenbone/gvm-libs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build-gmp-doc:
name: Build GMP documentation
runs-on: ubuntu-latest
container: gchr.io/greenbone/gvmd-build:stable
container: ${{ vars.IMAGE_REGISTRY }}/greenbone/gvmd-build:stable
steps:
- name: Check out gvmd
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
actions: read
contents: read
security-events: write
container: gchr.io/greenbone/gvmd-build:stable
container: ${{ vars.IMAGE_REGISTRY }}/greenbone/gvmd-build:stable

strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
build-args: |
VERSION=${{ steps.container-opts.outputs.version }}
GVM_LIBS_VERSION=${{ steps.container-opts.outputs.gvm-libs-version }}
IMAGE_REGISTRY=${{ vars.IMAGE_REGISTRY }}
file: .docker/prod.Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
Expand Down

0 comments on commit 74d3808

Please sign in to comment.