Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sbt-github-actions for basic CI #14

Closed
wants to merge 1 commit into from

Conversation

mdedetrich
Copy link
Contributor

So that we at least don't accidentally break something.

@mdedetrich mdedetrich requested review from jrudolph and pjfanning July 2, 2023 08:52
@@ -8,3 +8,15 @@ pekkoParadoxGithub := Some("https://github.com/apache/incubator-pekko-site")
inConfig(Assets)(Seq(
excludeFilter := excludeFilter.value -- ".htaccess"
))

ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches := Seq()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Intentionally left blank, lets not worry about publishing for now.

@mdedetrich mdedetrich force-pushed the add-sbt-github-actions branch from 86172c8 to a7d85c6 Compare July 2, 2023 08:54

name: Continuous Integration

on:
Copy link
Contributor

Choose a reason for hiding this comment

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

the lack of a permissions declaration is a problem - it would be great if the sbt plugin supported setting this

Copy link
Contributor Author

@mdedetrich mdedetrich Jul 2, 2023

Choose a reason for hiding this comment

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

It does now, I just forgot to set it. By default its full permissions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have a suggestion for the permissions?

Copy link
Contributor

Choose a reason for hiding this comment

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

if the GitHub Token is not removed, then this is probably what we need

permissions:
  contents: read

tags: [v*]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this? this token appears to be unused in this CI job

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its there by default but I might be able to turn it off.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So from https://github.com/sbt/sbt-github-actions#generative-1

  • githubWorkflowEnv : Map[String, String] – An environment which is global to the entire ci.yml workflow. Defaults to Map("GITHUB_TOKEN" -> "${{ secrets.GITHUB_TOKEN }}") since it's so commonly needed.

So to me the reasoning behind this is sensible considering. I am not entirely 100% sure if the current actions that are created by sbt-github-actions don't require a token, if you are sure of that I can remove it otherwise as a compromise we can leave it as it is and try to remove it in a future PR (for some reason github actions aren't triggering right now).

@mdedetrich
Copy link
Contributor Author

@pjfanning BTW If you have any general questions/issues regarding sbt-github-actions you can report it upstream at https://github.com/sbt/sbt-github-actions, I am actually a maintainer of the project.

strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.18]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
scala: [2.12.18]
scala: [2.12]

Btw. why is it running on 2.12 in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its a sbt plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also regarding including the patch version (i.e. 18), this is automatically generated by sbt-github-actions. The full Scala version is not necessary anymore in later sbt versions so this can be improved, see sbt/sbt-github-actions#158

Copy link
Contributor

@jrudolph jrudolph left a comment

Choose a reason for hiding this comment

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

No need for this in my opinion, it adds more complexity than necessary right now.

@mdedetrich
Copy link
Contributor Author

Closing this since there isn't willingless to merge it

@mdedetrich mdedetrich closed this Jul 3, 2023
@mdedetrich mdedetrich deleted the add-sbt-github-actions branch July 3, 2023 08:58
@mdedetrich mdedetrich mentioned this pull request Jul 3, 2023
@mdedetrich
Copy link
Contributor Author

@jrudolph Incase you change your mind, there was additional context for this PR (see #13 (comment)). Sorry if it wasn't clear from the beginning.

@pjfanning
Copy link
Contributor

@mdedetrich I don't object to this PR - I think it is useful to run sbt paradox on the PRs. I just have a fe minor concerns about what the sbt plugin generates.

We should probably even be thinking about a link validator job.

@mdedetrich
Copy link
Contributor Author

Sure, if @jrudolph changes his mind I will re-open the PR but this is low priority for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants