From 0ade62cceeb4c2ae65f3390a1fb55b5852e40ede Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Thu, 17 Feb 2022 18:14:16 +0300 Subject: [PATCH] updated build to skip pushing images for dev-sha and tags that start with v0. --- .github/workflows/build.yml | 8 ++++++-- src/Commands/State/ImportCommand.php | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7905e660..01e4dfce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,8 @@ jobs: tags: | type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} type=raw,value=dev-latest,enable=${{ endsWith(github.ref, '/dev') }} - type=ref,event=tag - type=sha + type=ref,event=tag,enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} + type=sha,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} flavor: | latest=false - name: Login to DockerHub @@ -38,3 +38,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} + VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} + REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} diff --git a/src/Commands/State/ImportCommand.php b/src/Commands/State/ImportCommand.php index d026cdea..1f104748 100644 --- a/src/Commands/State/ImportCommand.php +++ b/src/Commands/State/ImportCommand.php @@ -207,6 +207,7 @@ class ImportCommand extends Command gc_collect_cycles(); } + unset($queue); $this->logger->notice('Finished waiting HTTP Requests.'); $this->logger->notice(sprintf('Committing (%d) Changes.', count($this->mapper)));