Skip to content

Commit

Permalink
Try verify if container exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kam193 committed Nov 27, 2023
1 parent f4ebd72 commit d5b8f54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
BASE_IMAGE: cccs/assemblyline-v4-service-base:stable
REGISTRY: ghcr.io
BASE_TAG: 4.4.0.stable

jobs:
discover-services:
Expand Down Expand Up @@ -54,10 +55,12 @@ jobs:
if: steps.check-service-changed.outputs.exit-code != 0
run: |
make test
- name: Check VERSION file was changed in the commit
id: check-version-changed
- name: Check if the current version has already been pushed
id: check-if-pushed
run: |
git diff --quiet ${{ github.event.before }} ${{ github.event.after }} -- ${{ matrix.service }}/VERSION
export GHCR_TOKEN=$(echo $GITHUB_TOKEN | base64)
export TAG=$BASE_TAG$(cat VERSION)
curl -H "Authorization: Bearer ${GHCR_TOKEN}" https://ghcr.io/v2/kam193/${{ matrix.service }}/manifests/$TAG
- name: Push container
if: steps.check-version-changed.outputs.exit-code != 0
run: |
Expand Down
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ REGISTRY?=
PUSH_REGISTRY?=
BASE_IMAGE?=${REGISTRY}/cccs/assemblyline-v4-service-base:stable
SERVICE_NAME=assemblyline-service-template
BASE_TAG=4.4.0.stable
BASE_TAG?=4.4.0.stable

manifest:
sed -i "s/assemblyline-service-template/${SERVICE_NAME}/g" service_manifest.yml
Expand Down

0 comments on commit d5b8f54

Please sign in to comment.