diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..1988804 --- /dev/null +++ b/.github/workflows/cd.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index 89ea2d7..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag ntnu-kpro-ai-assistant:$(date +%s)