From ecdf4da803bbd49922bfddde57b20479b021a812 Mon Sep 17 00:00:00 2001 From: "S. MohammadMahdi Zamanian" Date: Fri, 19 Apr 2024 15:37:18 +0330 Subject: [PATCH] feat(workflows/publish-container): add `deploy` job --- .github/workflows/publish-container.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/publish-container.yml b/.github/workflows/publish-container.yml index 201fcf6..0224d66 100644 --- a/.github/workflows/publish-container.yml +++ b/.github/workflows/publish-container.yml @@ -88,6 +88,7 @@ jobs: type=semver,enable=true,pattern={{major}}.{{minor}} type=semver,enable=true,pattern={{version}} type=ref,enable=true,event=branch + type=raw,enable={{is_default_branch}},value=latest labels: | org.opencontainers.image.title="gecut/${{matrix.name}}" org.opencontainers.image.vendor="Gecut" @@ -112,3 +113,23 @@ jobs: # env: # COSIGN_EXPERIMENTAL: 'true' # run: echo "${{steps.meta.outputs.tags}}" | xargs -I {} cosign sign --yes {}@${{steps.build_and_push.outputs.digest}} + + deploy: + name: Deploy Container On Darkbue + container: hamravesh/darkube-cli:v1.1 + needs: build + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - name: hybrid-ui-demo-app + path: ./demo/ + context: . + + steps: + - name: darkube-cli deploy + run: darkube deploy --token ${{secrets.DEPLOY_TOKEN_HABIBIU_PWA}} + --app-id ${{secrets.APP_ID_HABIBIU_PWA}} --image-tag latest + --job-id ${GITHUB_RUN_ID}