Skip to content

Commit

Permalink
Try adding vortex msgs to pipeline build
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Strøm <[email protected]>
  • Loading branch information
Christopher Strøm committed Jul 27, 2024
1 parent 62d6fc5 commit e1e1979
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
name: Docker build and publish

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout repository
- name: Checkout this repository
uses: actions/checkout@v4
with:
path: vortex-freya-sim

- name: Checkout vortex-msgs repository
uses: actions/checkout@v4
with:
repository: vortexntnu/vortex-msgs
path: vortex-freya-sim/vortex_msgs

- name: Install cosign
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -51,7 +53,7 @@ jobs:
id: build-and-push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
context: vortex-freya-sim
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -61,9 +63,6 @@ jobs:
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

0 comments on commit e1e1979

Please sign in to comment.