Skip to content

Commit

Permalink
Fixed deployment of deps/* branches not being skipped.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Feb 13, 2025
1 parent d162c05 commit 6e6668e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ jobs:

- run:
name: Upload code coverage reports to Codecov
command: if [ -n "${CODECOV_TOKEN}" ] && [ -d /tmp/artifacts/coverage ]; then codecov -Z -s /tmp/artifacts/coverage; fi
command: |
if [ -n "${CODECOV_TOKEN}" ] && [ -d /tmp/artifacts/coverage ] && ! echo "${CIRCLE_BRANCH}" | grep -q '^deps/'; then
codecov -Z -s /tmp/artifacts/coverage;
fi
- persist_to_workspace:
root: /tmp/workspace
Expand Down Expand Up @@ -573,7 +576,7 @@ workflows:
# - release/2023-04-17, release/2023-04-17.123 (date-based)
# - hotfix/123.456.789, hotfix/123.456.789-rc.1213 (per https://semver.org/)
# - hotfix/2023-04-17, hotfix/2023-04-17.123 (date-based)
only: /^(production|main|master|develop)$|^project\/[a-zA-z0-9\-\.]+|^(feature|bugfix)\/[a-zA-Z0-9\-\.\,_]+$|^ci.*|^deps\/.*|^(release|hotfix)\/[0-9]+(\.[0-9]+){2}(-rc\.[0-9]+)?$|^(release|hotfix)\/[0-9]{4}-[0-9]{2}-[0-9]{2}(\.[0-9]+)?$/
only: /^(production|main|master|develop)$|^project\/[a-zA-z0-9\-\.]+|^(feature|bugfix)\/[a-zA-Z0-9\-\.\,_]+$|^ci.*|^(release|hotfix)\/[0-9]+(\.[0-9]+){2}(-rc\.[0-9]+)?$|^(release|hotfix)\/[0-9]{4}-[0-9]{2}-[0-9]{2}(\.[0-9]+)?$/
tags:
ignore: /.*/
- deploy-tags:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ jobs:

- name: Upload exported codebase as artifact
uses: actions/upload-artifact@v4
if: ${{ matrix.instance == 0 && !startsWith(github.ref, 'refs/heads/deps/') }}
if: ${{ matrix.instance == 0 && !startsWith(github.head_ref || github.ref_name, 'deps/') }}
with:
name: code-artifact
path: "/tmp/workspace/code"
Expand All @@ -352,7 +352,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
#;< !PROVISION_USE_PROFILE
if: ${{ github.event_name != 'schedule' && !startsWith(github.ref, 'refs/heads/deps/') }}
if: ${{ github.event_name != 'schedule' && !startsWith(github.head_ref || github.ref_name, 'deps/') }}
#;> !PROVISION_USE_PROFILE

container:
Expand Down
3 changes: 1 addition & 2 deletions tests/phpunit/CircleCiConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public static function dataProviderDeployBranchRegex(): array {
['ci'],
['cisomething'],

['deps/something'],

['release/123.456.789'],
['release/123.456.789-rc.123'],
['hotfix/123.456.789'],
Expand Down Expand Up @@ -140,6 +138,7 @@ public static function dataProviderDeployBranchRegex(): array {
['preci', FALSE],
['precipost', FALSE],

['deps/something', FALSE],
['deps', FALSE],
['predeps', FALSE],
['depspost', FALSE],
Expand Down

1 comment on commit 6e6668e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.