Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

Commit

Permalink
Merge pull request #26 from Kerosene-Labs/update-workflow
Browse files Browse the repository at this point in the history
hmmm
  • Loading branch information
hlafaille authored Dec 13, 2024
2 parents af1b13b + ba07be9 commit 04b47a8
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/sdlc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,18 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: app


- name: Determine PROJECT_VERSION
id: set-project-version
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "PROJECT_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "PROJECT_VERSION=${{ github.sha }}" >> $GITHUB_ENV
fi
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s ./settings.xml -Dgithub.token=${{ secrets.ACCESS_TOKEN }}
run: mvn deploy -s ./settings.xml -Dgithub.token=${{ secrets.ACCESS_TOKEN }} -Dproject.version=${PROJECT_VERSION}

publish_container:
if: github.event_name == 'release'
Expand All @@ -105,9 +114,18 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: app

- name: Determine PROJECT_VERSION
id: set-project-version
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "PROJECT_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "PROJECT_VERSION=${{ github.sha }}" >> $GITHUB_ENV
fi
- name: Build Container Image
run: docker build . -t ghcr.io/kerosene-labs/billtracker:${{ github.ref_name }}
run: docker build . -t ghcr.io/kerosene-labs/billtracker:${{ github.ref_name }} --build-arg PROJECT_VERSION=${PROJECT_VERSION}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down

0 comments on commit 04b47a8

Please sign in to comment.