-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into chore/change-dockerfile-argument
- Loading branch information
Showing
3 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ env: | |
jobs: | ||
check-build-deploy: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- workdir: ./backend | ||
|
@@ -109,9 +110,10 @@ jobs: | |
context: ${{ matrix.workdir }} | ||
file: ${{ matrix.dockerfile }} | ||
tags: ${{ steps.image_lowercase.outputs.lowercase }}:${{ env.TAG }} | ||
load: true | ||
load: false | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
outputs: type=docker,dest=/tmp/image-${{ matrix.name }}-${{ env.ENVIRONMENT }}.tar | ||
|
||
- name: Login to GHCR | ||
uses: docker/login-action@v2 | ||
|
@@ -123,20 +125,29 @@ jobs: | |
- name: Scan Docker image with Dockle | ||
id: dockle | ||
run: | | ||
wget https://github.com/goodwithtech/dockle/releases/download/v0.4.14/dockle_0.4.14_Linux-64bit.tar.gz | ||
tar zxvf dockle_0.4.14_Linux-64bit.tar.gz | ||
wget -q https://github.com/goodwithtech/dockle/releases/download/v0.4.14/dockle_0.4.14_Linux-64bit.tar.gz | ||
tar zxf dockle_0.4.14_Linux-64bit.tar.gz | ||
sudo mv dockle /usr/local/bin | ||
dockle --exit-level fatal --format json --output ${{ matrix.workdir }}/dockle_scan_output.json ${{ steps.image_lowercase.outputs.lowercase }}:${{ env.TAG }} | ||
echo " dockle exited w/ $?" | ||
dockle --exit-code 1 --exit-level fatal --format json --input '/tmp/image-${{ matrix.name }}-${{ env.ENVIRONMENT }}.tar' --output ${{ matrix.workdir }}/dockle_scan_output.json | ||
cat ${{ matrix.workdir }}/dockle_scan_output.json | ||
echo "outcome=success" >> $GITHUB_OUTPUT | ||
- name: Push Docker image to GHCR | ||
run: | | ||
docker load -i '/tmp/image-${{ matrix.name }}-${{ env.ENVIRONMENT }}.tar' | ||
rm -rf '/tmp/image-${{ matrix.name }}-${{ env.ENVIRONMENT }}.tar' | ||
docker push ${{ steps.image_lowercase.outputs.lowercase }}:${{ env.TAG }} | ||
- name: Add tag as a PR comment | ||
uses: ubie-oss/[email protected] | ||
id: comment-to-merged-pr | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
message: |- | ||
This PR is in the tag: ${{ env.TAG }} , for ${{ matrix.name }} service | ||
- name: Deploy with Qovery | ||
if: github.ref == 'refs/heads/dev' | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters