Skip to content

Commit

Permalink
adding a separate build for dev-sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmotevalli committed Apr 2, 2024
1 parent eb7bc70 commit b4e1404
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- dev-sample

jobs:

Expand Down Expand Up @@ -53,10 +54,19 @@ jobs:
id: timestamp
run: echo "::set-output name=timestamp::$(date +'%Y%m%d%H%M%S')"

- name: Set dynamic tag
id: set-tag
run: |
if [[ "${{ github.ref }}" == "refs/heads/dev-sample" ]]; then
echo "::set-output name=tag::ghcr.io/auscope/auscope-ckan-dev:sample-${{ steps.timestamp.outputs.timestamp }}"
else
echo "::set-output name=tag::ghcr.io/auscope/auscope-ckan-dev:latest-${{ steps.timestamp.outputs.timestamp }}"
fi
- name: Build and Push Docker image to GHCR (Dev)
uses: docker/build-push-action@v2
with:
context: ./ckan
file: ./ckan/Dockerfile # Consider using a separate Dockerfile for dev if needed
tags: ghcr.io/auscope/auscope-ckan-dev:latest-${{ steps.timestamp.outputs.timestamp }}
tags: ${{ steps.set-tag.outputs.tag }} # ghcr.io/auscope/auscope-ckan-dev:latest-${{ steps.timestamp.outputs.timestamp }}
push: true

0 comments on commit b4e1404

Please sign in to comment.