Skip to content

Commit

Permalink
Swapped default semantics to CheckoutFull (to avoid ci-release and mi…
Browse files Browse the repository at this point in the history
…ma issues)
  • Loading branch information
djspiewak committed Aug 29, 2020
1 parent 3a9ebfe commit 82172ac
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ jobs:
shell: bash
run: git config --global core.autocrlf false

- name: Checkout current branch (fast)
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
Expand Down Expand Up @@ -110,8 +112,10 @@ jobs:
if: contains(runner.os, 'windows')
run: git config --global core.autocrlf false

- name: Checkout current branch (fast)
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/sbtghactions/GenerativePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}"""
}

autoCrlfOpt ::: List(
WorkflowStep.Checkout,
WorkflowStep.CheckoutFull,
WorkflowStep.SetupScala) :::
githubWorkflowGeneratedCacheSteps.value.toList
},
Expand Down
6 changes: 5 additions & 1 deletion src/main/scala/sbtghactions/WorkflowStep.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ sealed trait WorkflowStep extends Product with Serializable {

object WorkflowStep {

val CheckoutFull: WorkflowStep = Use("actions", "checkout", "v1", name = Some("Checkout current branch (full)"))
val CheckoutFull: WorkflowStep = Use(
"actions", "checkout", "v2",
name = Some("Checkout current branch (full)"),
params = Map("fetch-depth" -> "0"))

val Checkout: WorkflowStep = Use("actions", "checkout", "v2", name = Some("Checkout current branch (fast)"))

val SetupScala: WorkflowStep = Use("olafurpg", "setup-scala", "v5", name = Some("Setup Java and Scala"), params = Map("java-version" -> s"$${{ matrix.java }}"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
test: is
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
Expand Down Expand Up @@ -109,8 +111,10 @@ jobs:
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ jobs:
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
Expand Down Expand Up @@ -98,8 +100,10 @@ jobs:
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
Expand Down

0 comments on commit 82172ac

Please sign in to comment.