Skip to content

Commit f29e981

Browse files
committed
Add handling of tag refs
1 parent db49d5d commit f29e981

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/aws-main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
name: "Push images"
191191
runs-on: ubuntu-latest
192192
# push image on master, target branch not set, and the dependent steps were either successful or skipped
193-
if: github.ref == 'refs/heads/master' && !failure() && !cancelled() && github.repository == 'localstack/localstack'
193+
if: ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') ) && !failure() && !cancelled() && github.repository == 'localstack/localstack'
194194
needs:
195195
# all tests need to be successful for the image to be pushed
196196
- test
@@ -269,7 +269,7 @@ jobs:
269269
270270
push-to-tinybird:
271271
name: Push Workflow Status to Tinybird
272-
if: always() && github.ref == 'refs/heads/master' && github.repository == 'localstack/localstack'
272+
if: always() && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') ) && github.repository == 'localstack/localstack'
273273
runs-on: ubuntu-latest
274274
needs:
275275
- test

.github/workflows/aws-tests.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ env:
132132
CI_COMMIT_SHA: ${{ github.sha }}
133133
CI_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}
134134
# report to tinybird if executed on master
135-
TINYBIRD_PYTEST_ARGS: "${{ github.repository == 'localstack/localstack' && github.ref == 'refs/heads/master' && '--report-to-tinybird ' || '' }}"
135+
TINYBIRD_PYTEST_ARGS: "${{ github.repository == 'localstack/localstack' && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') ) && '--report-to-tinybird ' || '' }}"
136136
DOCKER_PULL_SECRET_AVAILABLE: ${{ secrets.DOCKERHUB_PULL_USERNAME != '' && secrets.DOCKERHUB_PULL_TOKEN != '' && 'true' || 'false' }}
137137

138138

@@ -150,7 +150,7 @@ jobs:
150150
exclude:
151151
# skip the ARM integration tests in forks, and also if not on master/upgrade-dependencies and forceARMTests is not set to true
152152
# TODO ARM runners are not yet available for private repositories; skip them for potential private forks
153-
- runner: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'ubuntu-24.04-arm' || ''}}
153+
- runner: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/v') && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'ubuntu-24.04-arm' || ''}}
154154
fail-fast: false
155155
runs-on: ${{ matrix.runner }}
156156
steps:
@@ -338,7 +338,7 @@ jobs:
338338
exclude:
339339
# skip the ARM integration tests in forks, and also if not on master/upgrade-dependencies and forceARMTests is not set to true
340340
# TODO ARM runners are not yet available for private repositories; skip them for potential private forks
341-
- runner: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'ubuntu-24.04-arm' || ''}}
341+
- runner: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/v') && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'ubuntu-24.04-arm' || ''}}
342342
fail-fast: false
343343
runs-on: ${{ matrix.runner }}
344344
env:
@@ -489,7 +489,7 @@ jobs:
489489
exclude:
490490
# skip the ARM integration tests in forks, and also if not on master/upgrade-dependencies and forceARMTests is not set to true
491491
# TODO ARM runners are not yet available for private repositories; skip them for potential private forks
492-
- arch: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'arm64' || ''}}
492+
- arch: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/v') && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'arm64' || ''}}
493493
needs:
494494
- test-integration
495495
- test-bootstrap
@@ -535,7 +535,7 @@ jobs:
535535
exclude:
536536
# skip the ARM integration tests in forks, and also if not on master/upgrade-dependencies and forceARMTests is not set to true
537537
# TODO ARM runners are not yet available for private repositories; skip them for potential private forks
538-
- runner: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'ubuntu-24.04-arm' || ''}}
538+
- runner: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/v') && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'ubuntu-24.04-arm' || ''}}
539539
fail-fast: false
540540
runs-on: ${{ matrix.runner }}
541541
env:
@@ -610,7 +610,7 @@ jobs:
610610
exclude:
611611
# skip the ARM integration tests in forks, and also if not on master/upgrade-dependencies and forceARMTests is not set to true
612612
# TODO ARM runners are not yet available for private repositories; skip them for potential private forks
613-
- arch: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'arm64' || ''}}
613+
- arch: ${{ ((github.repository != 'localstack/localstack') || (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/v') && github.ref != 'upgrade-dependencies' && inputs.forceARMTests == false)) && 'arm64' || ''}}
614614
needs:
615615
- test-acceptance
616616
runs-on: ubuntu-latest
@@ -639,7 +639,7 @@ jobs:
639639

640640
test-cloudwatch-v1:
641641
name: Test CloudWatch V1
642-
if: ${{ !inputs.onlyAcceptanceTests && (github.ref == 'refs/heads/master' || needs.test-preflight.outputs.cloudwatch-v1 == 'true') }}
642+
if: ${{ !inputs.onlyAcceptanceTests && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') || needs.test-preflight.outputs.cloudwatch-v1 == 'true') }}
643643
runs-on: ubuntu-latest
644644
needs:
645645
- test-preflight
@@ -689,7 +689,7 @@ jobs:
689689

690690
test-ddb-v2:
691691
name: Test DynamoDB(Streams) v2
692-
if: ${{ !inputs.onlyAcceptanceTests && (github.ref == 'refs/heads/master' || needs.test-preflight.outputs.dynamodb-v2 == 'true') }}
692+
if: ${{ !inputs.onlyAcceptanceTests && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') || needs.test-preflight.outputs.dynamodb-v2 == 'true') }}
693693
runs-on: ubuntu-latest
694694
needs:
695695
- test-preflight
@@ -738,7 +738,7 @@ jobs:
738738

739739
test-events-v1:
740740
name: Test EventBridge v1
741-
if: ${{ !inputs.onlyAcceptanceTests && (github.ref == 'refs/heads/master' || needs.test-preflight.outputs.events-v1 == 'true') }}
741+
if: ${{ !inputs.onlyAcceptanceTests && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') || needs.test-preflight.outputs.events-v1 == 'true') }}
742742
runs-on: ubuntu-latest
743743
needs:
744744
- test-preflight
@@ -787,7 +787,7 @@ jobs:
787787

788788
test-cfn-v2-engine:
789789
name: Test CloudFormation Engine v2
790-
if: ${{ !inputs.onlyAcceptanceTests && ( github.ref == 'refs/heads/master' || needs.test-preflight.outputs.cloudformation-v2 == 'true' )}}
790+
if: ${{ !inputs.onlyAcceptanceTests && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') || needs.test-preflight.outputs.cloudformation-v2 == 'true' )}}
791791
runs-on: ubuntu-latest
792792
needs:
793793
- test-preflight
@@ -882,7 +882,7 @@ jobs:
882882

883883
capture-not-implemented:
884884
name: "Capture Not Implemented"
885-
if: ${{ !inputs.onlyAcceptanceTests && github.ref == 'refs/heads/master' }}
885+
if: ${{ !inputs.onlyAcceptanceTests && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') ) }}
886886
runs-on: ubuntu-latest
887887
needs: build
888888
env:

0 commit comments

Comments
 (0)