Skip to content

Commit

Permalink
Fix Workflow Concurrency (#92)
Browse files Browse the repository at this point in the history
# Fix Workflow Concurrency

## ♻️ Current situation & Problem
- ` ${{ github.workflow }}` seems to be inherited from the parent
workflow as noted in https://github.com/orgs/community/discussions/30708


## ⚙️ Release Notes 
- Adds concrete names for the concurrency groups.

## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).

---------

Co-authored-by: Andreas Bauer <andreas.bauer@stanford.edu>
  • Loading branch information
PSchmiedmayer and Supereg authored Nov 18, 2024
1 parent ea08d6d commit 70706eb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/beta-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
group: Beta-Deployment
cancel-in-progress: false

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: Build-and-Test-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: Documentation-Deployment-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: Static-Analysis-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
12 changes: 10 additions & 2 deletions TemplateApplication/Account/AccountSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import SwiftUI


struct AccountSheet: View {
private let dismissAfterSignIn: Bool

@Environment(\.dismiss) var dismiss

@Environment(Account.self) private var account
Expand All @@ -33,7 +35,9 @@ struct AccountSheet: View {
}
} else {
AccountSetup { _ in
dismiss() // we just signed in, dismiss the account setup sheet
if dismissAfterSignIn {
dismiss() // we just signed in, dismiss the account setup sheet
}
} header: {
AccountSetupHeader()
}
Expand All @@ -50,13 +54,17 @@ struct AccountSheet: View {
}
}

var closeButton: some ToolbarContent {
@ToolbarContentBuilder private var closeButton: some ToolbarContent {
ToolbarItem(placement: .cancellationAction) {
Button("Close") {
dismiss()
}
}
}

init(dismissAfterSignIn: Bool = true) {
self.dismissAfterSignIn = dismissAfterSignIn
}
}


Expand Down
2 changes: 1 addition & 1 deletion TemplateApplication/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct HomeView: View {
.tabViewStyle(.sidebarAdaptable)
.tabViewCustomization($tabViewCustomization)
.sheet(isPresented: $presentingAccount) {
AccountSheet()
AccountSheet(dismissAfterSignIn: false) // presentation was user initiated, do not automatically dismiss
}
.accountRequired(!FeatureFlags.disableFirebase && !FeatureFlags.skipOnboarding) {
AccountSheet()
Expand Down

0 comments on commit 70706eb

Please sign in to comment.