Skip to content

Commit

Permalink
update ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Smartich0ke committed Aug 19, 2023
1 parent 8da20b9 commit 4efb411
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
npm install
npm run build
- name: Get Version from composer.json
run: echo "COMPOSER_VERSION=$(jq -r '.version' composer.json)" >> $GITHUB_ENV

- name: Bump Build Number
run: echo "VERSION=${COMPOSER_VERSION}-build-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV

- name: Run PHPUnit Tests
run: vendor/bin/phpunit

Expand All @@ -67,10 +73,13 @@ jobs:

- name: Build and Push Docker Image
run: |
docker build -t harbor.artichokenetwork.com/ferritecms/ferrite:latest .
docker build -t harbor.artichokenetwork.com/ferritecms/ferrite:latest -t harbor.artichokenetwork.com/ferritecms/ferrite:${VERSION} .
docker push harbor.artichokenetwork.com/ferritecms/ferrite:latest
- name: Sign the Docker Image
docker push harbor.artichokenetwork.com/ferritecms/ferrite:${VERSION}
- name: Sign the Docker Image with Latest Tag
run: cosign sign --yes --key env://COSIGN_PRIVATE_KEY harbor.artichokenetwork.com/ferritecms/ferrite:latest

- name: Sign the Docker Image with Version Tag
run: cosign sign --yes --key env://COSIGN_PRIVATE_KEY harbor.artichokenetwork.com/ferritecms/ferrite:${VERSION}

0 comments on commit 4efb411

Please sign in to comment.