Skip to content

Commit

Permalink
[ci] Make repository field in image parameterized
Browse files Browse the repository at this point in the history
Downstream github forks can not enable CI since the build-docker workflows is hardcoded to push to the pulp-platform organization
  • Loading branch information
JosseVanDelm committed Sep 12, 2023
1 parent 49adab2 commit 81152eb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
push:
branches: [main]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-docker:
name: Deploy Docker image
Expand All @@ -21,12 +24,18 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: util/container/Dockerfile
push: true
tags: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |-
SNITCH_LLVM_VERSION=latest

0 comments on commit 81152eb

Please sign in to comment.