Skip to content

Commit

Permalink
build: Make CD workflow only run after successful CI workflow
Browse files Browse the repository at this point in the history
Co-authored-by: Sverre Nystad <89105607+SverreNystad@users.noreply.github.com>
  • Loading branch information
andreaslhjulstad and SverreNystad committed Sep 20, 2024
1 parent 6ca7494 commit 3cc06a4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CD

on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest

# Only runs if CI was successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ntnu-kpro-ai-assistant:$(date +%s)

- name: Push the Docker image
run: echo TODO Push the Docker image
18 changes: 0 additions & 18 deletions .github/workflows/docker-image.yml

This file was deleted.

0 comments on commit 3cc06a4

Please sign in to comment.