Skip to content

Commit

Permalink
change to vars in github
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Baker committed Jan 6, 2025
1 parent 21f2851 commit 94537bf
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build-push-Image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ on:
jobs:
build:
runs-on: ubuntu-latest

env:
OSQUERY_VERSION: ${{ vars.OSQUERY_VERSION }}
OSCTRL_VERSION: ${{ vars.OSCTRL_VERSION }}

strategy:
matrix:
service:
# Each object in this list represents one image to build
# Adjust paths if your Dockerfiles differ
- name: osctrl-tls
file: deploy/docker/dockerfiles/Dockerfile-dev-tls
- name: osctrl-admin
Expand All @@ -27,8 +29,6 @@ jobs:
file: deploy/docker/dockerfiles/Dockerfile-dev-cli
- name: osctrl-osquery
file: deploy/docker/dockerfiles/Dockerfile-osquery
# If you want to build the dev images, replace the file paths with e.g.:
# ./deploy/docker/dockerfiles/Dockerfile-dev-tls, etc.

steps:
- name: Checkout
Expand All @@ -47,15 +47,12 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Optional: Set up Go if you need to run 'go build' or 'make' steps before Docker build
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: "stable"

- name: Build and Push ${{ matrix.service.name }}
uses: docker/build-push-action@v6
with:
build-args: |
OSQUERY_VERSION=${{ env.OSQUERY_VERSION }}
OSCTRL_VERSION=${{ env.OSCTRL_VERSION }}
context: .
# The key line: specify the correct Dockerfile path from the matrix
file: ${{ matrix.service.file }}
Expand Down

0 comments on commit 94537bf

Please sign in to comment.