https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
github-workflows-kt
  • j

    jmfayard

    02/02/2022, 3:55 PM
    I find the
    uses
    api not very intuitive (although it follows GitHub convention)
    uses(
                name = "Download common artifact",
                action = DownloadArtifactV2(
                    name = "common-artifact",
                    path = "python",
                )
            )
    I was thinking about adding this syntactic sugar
    fun step(name: String, condition: String? = null, action: () -> Action)
    so that we can do something like this
    step("Download common artifact") {
                DownloadArtifactV2(
                    name = "common-artifact",
                    path = "python",
                )
            }
    p
    • 2
    • 3
  • j

    jmfayard

    02/04/2022, 1:15 PM
    Is something still missing in my PR? https://github.com/krzema12/github-actions-kotlin-dsl/pull/62
    p
    • 2
    • 18
  • p

    Piotr Krzemiński

    02/14/2022, 8:40 AM
    https://github.com/krzema12/github-actions-kotlin-dsl/releases/tag/v0.7.0
    j
    • 2
    • 5
  • j

    jmfayard

    02/14/2022, 11:27 AM
    I was surprised how easy it is to break the compiler for Kotlin scripts It throwed two times
    error: backend Internal error: Exception during IR lowering
    File being compiled: /Users/jmfayard/tignum/backend-tignum-x/.github/workflows/build.main.kts
    then you no idea what line is causing the problems and have to ressort to trials and errors In my case it was those two snippets:
    fun secret(variable: String): String =
        "\${{ secrets.$variable }}"
    and
    data class Step(val name: String, val action: Action)
    
    infix fun String.does(action: Action) = Step(this, action)
    p
    n
    • 3
    • 3
  • p

    Piotr Krzemiński

    02/16/2022, 8:43 AM
    hi @jmfayard , thanks for implementing all these features you miss in the lib! you're really on fire with the contributions 🔥 please let me know once you think you've got all the features that you need in your workflows, then I'll prepare a release
    j
    • 2
    • 5
  • a

    andylamax

    02/16/2022, 12:56 PM
    I plan on migrating our large project to use this library today. Fingers crossed
    🤞 1
    p
    l
    • 3
    • 24
  • a

    andylamax

    02/21/2022, 2:28 AM
    how does one get/set an id of a specific step?? Can I get outputs of a certain step?
    p
    n
    • 3
    • 9
  • p

    Piotr Krzemiński

    02/21/2022, 7:04 PM
    @andylamax do you need any other feature or an action wrapper to support your workflows? I could add them into the next release to speed things up
    n
    a
    • 3
    • 7
  • p

    Piotr Krzemiński

    02/26/2022, 7:33 PM
    https://github.com/krzema12/github-actions-kotlin-dsl/releases/tag/v0.9.0
    n
    • 2
    • 7
  • n

    Nikky

    02/26/2022, 7:37 PM
    thinking of adding a utility for multi workflow outputs, could use arguments passed to the script to have it print out the correct workflow and without args it will just write all the yaml files
    p
    • 2
    • 7
  • k

    khairil.ushan

    02/26/2022, 8:07 PM
    Hi everyone, I’m trying to setup a workflow to deploy my KMM iOS app. But it’s fail when doing
    xcodebuild clean archive
    comman, it failed to execute the run script. Do I need to setup something related with Java or gradle on my step?
    n
    • 2
    • 5
  • n

    Nikky

    02/26/2022, 8:16 PM
    if we could rename the channel to #github-actions-dsl that would be more clear..
    👍 1
    p
    • 2
    • 2
  • l

    louiscad

    02/27/2022, 5:28 PM
    Wild thoughts about supporting reference of other steps/jobs: I think we could have a type wrapping a reference to a previous job or step, with
    or
    and
    and
    functions/extensions, plus maybe other operators, and that would allow the library to keep track of which values are referenced, and automatically add the right
    needs
    clauses.
    💡 1
    p
    n
    • 3
    • 19
  • n

    Nikky

    03/02/2022, 2:16 PM
    @jmfayard this might interest you too: https://github.com/krzema12/github-actions-kotlin-dsl/pull/105
    👍 1
    p
    • 2
    • 1
  • k

    khairil.ushan

    03/03/2022, 5:50 AM
    Hi everyone, i have question about github actions, but not necessarily the kotlin-dsl thing. sorry if this is not the right place? feel free to let me know where i should discuss this. When setting up actions for iOS, i need to execute
    ./gradlew assembleXCFrameworks
    first and that takes so much time, since I also have to do this on macOS vm, it cost much more as well. Is that common? or is there any work around to cut the time to run that gradle task? Thanks before. 🙏
    p
    • 2
    • 2
  • n

    Nikky

    03/03/2022, 11:13 PM
    with kotlin 1.6.20 we can maybe have the user pass
    __FILE__
    into
    toYaml
    and
    writeToFile
    functions.. then we can locate the current script and find the target file no matter what directly the script gets executed from.. too bad there is no good way to get it at runtime in the library..
    p
    • 2
    • 4
  • n

    Nikky

    03/04/2022, 9:56 AM
    just asking but the difference bwetween
    println(workflow.toYaml())
    adding a newline at the end of the file when piped into the yaml and
    workflow.writeToFile()
    not doing so is not so important right? .. we could make
    writeToFile()
    add a newline too, just to make it more unified (also some editors show warnings on files without trailing linebreak) i guess its bad form to not have that..
    p
    • 2
    • 3
  • n

    Nikky

    03/05/2022, 10:13 AM
    detekt is annoying..
    EndToEndTest
    is over 600 lines now and that apparently a problem..
    p
    • 2
    • 3
  • n

    Nikky

    03/05/2022, 11:00 AM
    annoying that the test report does not show the diff, had to boot into windows, fix the obvious issue (forgot to call the
    invariantSeparatorsPathString
    in one spot) anyways.. now all the checks pass finally
    p
    • 2
    • 1
  • j

    jmfayard

    03/05/2022, 9:51 PM
    My Saturday hackathon: Automatically generate your Kotlin script from your existing YAML workflow https://github.com/krzema12/github-actions-kotlin-dsl/pull/117
    :blob-think-smart: 2
    :think-smart: 2
    p
    • 2
    • 1
  • p

    Piotr Krzemiński

    03/08/2022, 10:22 AM
    it would be so cool to have a way for the actions owners to specify typings in action.yml... then as we encourage them to do it, we could get rid of the typings in our wrapper generator, and adding such wrapper generator would mean literally a single line of code. Any thoughts? It's not an easy task, it would mean establishing some kind of standard
    j
    • 2
    • 6
  • p

    Piotr Krzemiński

    03/09/2022, 7:17 AM
    https://github.com/krzema12/github-actions-kotlin-dsl/releases/tag/v0.10.0
    🎉 2
    :kotlin-intensifies: 3
    n
    • 2
    • 12
  • j

    jmfayard

    03/09/2022, 8:02 AM
    Small thing: why does the consistency check contains
    sudo snap install --classic kotlin
    ? Kotlin is installed by default on GitHub actions images
    ✅ 1
    p
    n
    l
    • 4
    • 11
  • j

    jmfayard

    03/12/2022, 9:26 PM
    Is it possible to publish a 1.0-SNAPSHOT version of the library to mvaenLocal() and to use it then in a Kotlin script?
    b
    l
    p
    • 4
    • 10
  • p

    Piotr Krzemiński

    03/15/2022, 2:48 PM
    just discovered a similar library to mine: https://github.com/nefilim/kotlin-github-actions-dsl - I'm going to talk to the author so that we can unite our forces 🙂
    j
    p
    • 3
    • 8
  • n

    Nikky

    03/22/2022, 1:52 PM
    this is probably not the most stble way to use the dsl:
    @file:Repository("<https://jitpack.io>")
    @file:DependsOn("com.github.nikkyai:github-actions-kotlin-dsl:main-SNAPSHOT")
    when merging the jitpack PR i would suggest people to pin their dependency to a commit hash instead of a branch name to avoid the consistency check failing when branch
    main
    is
    moving fast and breaking things
    😛
    p
    • 2
    • 2
  • p

    Piotr Krzemiński

    03/22/2022, 7:34 PM
    https://github.com/krzema12/github-actions-kotlin-dsl/releases/tag/v0.11.0
    💯 1
    🎉 1
    j
    n
    • 3
    • 3
  • n

    Nikky

    03/22/2022, 11:25 PM
    i stumbled over the fact that
    job.name
    is not the same field as
    Job(name=)
    as what the dsl calls name is actually the id.. and name can be set as a display property.. maybe something we would like to fix earlier rather than later..
    p
    • 2
    • 4
  • j

    jmfayard

    03/24/2022, 3:03 PM
    I'm sorry 😅
    p
    • 2
    • 2
  • j

    Javier

    03/24/2022, 3:07 PM
    Based on comments in other channels, a Gradle integration via plugin which has a task which can be configured to be attached to the assemble lifecycle task (optional via prop) plus cacheable can be a feature request. This allow removing the need of having kotlin installed. So having both options, Kotlin and Gradle, would help the adoption of this library
    p
    n
    • 3
    • 4
Powered by Linen
Title
j

Javier

03/24/2022, 3:07 PM
Based on comments in other channels, a Gradle integration via plugin which has a task which can be configured to be attached to the assemble lifecycle task (optional via prop) plus cacheable can be a feature request. This allow removing the need of having kotlin installed. So having both options, Kotlin and Gradle, would help the adoption of this library
p

Piotr Krzemiński

03/24/2022, 5:13 PM
You can already use the library from Gradle, with a couple of tweaks. Feel free to create such feature request, best if with some usage examples :)
BTW, what other channels you mean? Was this library discussed there?
n

Nikky

03/25/2022, 7:44 AM
i asked in #scripting about how to execute
main.kts
files from gradle without needing kotlin installed on your system
👍 1
p

Piotr Krzemiński

03/25/2022, 11:53 AM
Ok, it would be cool to track it in the issues on GitHub. Could you create one please? I may lack some context
View count: 4