Skip to content

Commit

Permalink
timestamp based groups
Browse files Browse the repository at this point in the history
  • Loading branch information
mujahid committed Oct 22, 2024
1 parent 5fd0156 commit 57ff3bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:
ref:
required: false
type: string
run_id:
timestamp:
required: false
type: string
push:
branches: ['build-release-*']

concurrency:
group: ${{ github.workflow }}-${{ inputs.run_id || github.ref }}
cancel-in-progress: ${{ inputs.run_id == '' }}
group: ${{ github.workflow }}-${{ inputs.ref || github.ref }}
cancel-in-progress: true

jobs:
# This job is meant to emulate what developers working with the Agoric platform will experience
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
ref:
required: false
type: string
run_id:
timestamp:
required: false
type: string

concurrency:
group: ${{ github.workflow }}-${{ inputs.run_id || github.ref }}
cancel-in-progress: ${{ inputs.run_id == '' }}
group: ${{ github.workflow }}-${{ inputs.timestamp || github.ref }}
cancel-in-progress: true

env:
AGORIC_AVA_USE_TAP: true
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/test-workflow-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ on:
description: 'Additional data'
required: false

concurrency:
group: remote-trigger-${{ github.workflow }}-${{ github.ref }}-${{ github.run_id }}
cancel-in-progress: false

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
run_id: ${{ steps.set-run-id.outputs.run_id }}
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -31,11 +26,6 @@ jobs:
TIMESTAMP=$(date +%Y%m%d%H%M%S)
echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
- name: Set unique run ID
id: set-run-id
run: |
echo "run_id=${{ github.run_id }}-${{ github.run_attempt }}" >> $GITHUB_OUTPUT
- name: Create draft branch
run: |
git checkout -b build-draft-${{ steps.set-timestamp.outputs.timestamp }}
Expand All @@ -46,14 +36,14 @@ jobs:
uses: ./.github/workflows/test-all-packages.yml
with:
ref: build-draft-${{ needs.prepare.outputs.timestamp }}
run_id: ${{ needs.prepare.outputs.run_id }}
timestamp: ${{ needs.prepare.outputs.timestamp }}

integration:
needs: prepare
uses: ./.github/workflows/integration.yml
with:
ref: build-draft-${{ needs.prepare.outputs.timestamp }}
run_id: ${{ needs.prepare.outputs.run_id }}
timestamp: ${{ needs.prepare.outputs.timestamp }}

create-release-branch:
needs: [prepare, test-all-packages, integration]
Expand Down

0 comments on commit 57ff3bd

Please sign in to comment.