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
  • p

    Piotr Krzemiński

    01/23/2023, 2:06 PM
    @Vampire I’m wondering if you can implement https://github.com/krzema12/github-workflows-kt/issues/641 - I’m curious if the guide on adding a new action is understandable and correct: https://github.com/krzema12/github-workflows-kt/blob/main/CONTRIBUTING.md#requestingadding-support-for-an-action
    v
    • 2
    • 28
  • v

    Vampire

    01/23/2023, 4:34 PM
    Anyone interested in an excessive use of this nice lib? I finished my actions migration: https://github.com/Vampire/setup-wsl/blob/4eea7c92d6c56a39bfcebcdcb93be63388497f59/.github/workflows/test.main.kts 🙂 (Be careful, the GitHub code highlighting is broken from line 385 on :-D)
    v
    p
    • 3
    • 6
  • p

    Piotr Krzemiński

    01/24/2023, 7:29 AM
    kudos to @Vampire for all his contributions and feedback when onboarding the lib 🙂 🚀 now the library is even more Windows-friendly 😉
  • p

    Piotr Krzemiński

    01/24/2023, 9:59 AM
    @Vampire I see there’s a repeated piece in your workflows: the copyright note. FYI, there’s a way to extract it to a common place (see _shared.main.kts in the lib), but in practice it’s unfortunately a bit painful to use due to these bugs: • Scripts: @file:Import() in kotlin-main-kts uses a stale cache • Imported script are not supported for scripts outside of a source root maybe you could +1 them to increase chances of getting them fixed because you’d potentially also use this feature
    v
    • 2
    • 2
  • v

    Vampire

    01/24/2023, 5:17 PM
    Hm, I need
    actions/cache/restore@v3
    and
    actions/cache/save@v3
    . But I fear the generator will not work with that? 😭
    p
    • 2
    • 55
  • v

    Vampire

    01/24/2023, 6:06 PM
    How do you feed an expression calculated value to a typed input, for example a boolean input? I guess just with custom arguments for now and for proper support for that we would need denotable union types when they finally get added hopefully.
    p
    • 2
    • 6
  • v

    Vampire

    01/24/2023, 7:42 PM
    Great, how did I now break the IDE support for the scripts completely? No code completion whats-o-ever, no error highlighting, no navigation not even to the decompiled classes, just not usable. grml Have you seen that behavior before and / or any idea? I already did an invalidate index and restart, but no change.
    p
    • 2
    • 20
  • p

    Piotr Krzemiński

    01/27/2023, 9:16 AM
    I'd like to bring your attention to this PR: https://github.com/actions/stale/pull/830 which aims at adding action typings for a first-party GitHub action with most inputs. It plays an important role in boosting adoption of the typings standard. If it gets merged, it should be much easier to convince action authors to onboard. Feel free to leave your +1 or approve, if you approve 😉
    v
    • 2
    • 5
  • d

    Damien O'Hara

    01/30/2023, 5:38 AM
    hello all - I'm looking for a way to use github-workflows-kt as a standalone GH workflow YAML builder without Kotlin script or any of the file handling/checking aspects. is this an intended/supported use-case? my current approach is to pass in a fake file path for
    sourceFile
    and call toYaml with
    addConsistencyCheck = false
    . example:
    val wf = workflow(
        name = "test",
        on = listOf(Push()),
        sourceFile = Path("not-a-real-file")
    ) {
        job("test", runsOn = RunnerType.UbuntuLatest) {
            run(command = "echo 'Hello!'")
        }
    }
    
    val yaml = wf.toYaml(addConsistencyCheck = false)
    
    println(yaml)
    p
    • 2
    • 28
  • p

    Piotr Krzemiński

    02/01/2023, 9:39 PM
    github-actions-typing got their first stable v1.0.0 release! Please remember about it when contributing typings to various actions, I've also updated the usage guide to point to v1
    v
    l
    • 3
    • 59
  • p

    Piotr Krzemiński

    02/03/2023, 8:28 AM
    🎉 v0.36.0 released! Kudos go to @Vampire and @Damien O'Hara for their contributions!
    v
    • 2
    • 9
  • s

    Slackbot

    02/03/2023, 12:46 PM
    This message was deleted.
  • d

    Damien O'Hara

    02/05/2023, 8:58 AM
    I am investigating how to make generated YAML more idiomatic per standard Github Actions conventions. could there be a future where
    snakeyaml-engine
    is replaced by a dedicated YAML builder in the
    library
    module in pursuit of this? happy to fully prototype and test a replacement for the snakeyaml emitter
    v
    p
    • 3
    • 8
  • p

    Piotr Krzemiński

    02/05/2023, 3:26 PM
    @Alina Dolgikh [JB] I'm wondering what superpowers I get when I become a mod of this channel. In particular I'd like to be able to call @here and @channel for announcements relevant for all customers of my lib (like this). Is it possible?
    a
    • 2
    • 5
  • v

    vladimirsitnikov

    02/06/2023, 5:05 AM
    @Piotr Krzemiński , have you tried asking GitHub to add type information to action.yml schema? Information like type (string, numeric, enum) is helpful anyway. It might be that json schema would work nice there. I guess the repo for the issue would be https://github.com/actions/runner
    p
    • 2
    • 19
  • a

    Alina Dolgikh [JB]

    02/09/2023, 1:26 PM
    <!channel> (on behalf of @Piotr Krzemiński): I’d like to gather as much feedback in the survey as possible, so if you’re actively interested in the future of github-workflows-kt, please vote and share your thoughts: https://github.com/krzema12/github-workflows-kt/discussions/633 . If you’re not interested, forgive the ping 🙂
  • d

    Damien O'Hara

    02/13/2023, 1:39 PM
    hi all. I'm trying to port this workflow to
    github-workflows-kt
    but I am not sure how to tackle the line
    url: ${{ steps.deployment.outputs.page_url }}
    . I don't mind hard coding it in a _customArgument it but I don't see a way to provide the
    deployment
    step id to that deployment step. hard-coding the generated id (e.g.
    step-4
    ) seems brittle since the ids are positional. any thoughts on the best approach here?
    p
    v
    • 3
    • 28
  • v

    Vampire

    02/13/2023, 5:17 PM
    There is currently no way to get custom outputs from an action that does not have outputs at all, for example because it was modelled wrongly or because the outputs were just added by the action developer. If I were to create a PR to fix that, how would you prefer it? I see three options: • Make any action have custom outputs available • Make
    ExternalActionStep
    have a function
    withCustomOutputs()
    • Make
    ExternalActionStep
    have a property
    withCustomOutputs
    p
    • 2
    • 30
  • p

    Piotr Krzemiński

    02/14/2023, 8:16 AM
    @Vampire maybe you'll know as a Windows-man 🙂 I want to make this change to be able to use Gradle 8: https://github.com/krzema12/github-workflows-kt/pull/684 but I'm getting this on Windows:
    No compatible toolchains found for request specification: {languageVersion=11, vendor=any, implementation=vendor-specific} (auto-detect true, auto-download false).
    it seems a bit weird, 11 is still pretty popular - why wouldn't it be available? I'm checking the included software and Java 11 is there 🤔
    v
    • 2
    • 10
  • p

    Piotr Krzemiński

    02/17/2023, 10:13 AM
    🚀 v0.37.0 released!
  • p

    Piotr Krzemiński

    02/21/2023, 2:25 PM
    @Adam S I’d like to continue the discussion on a custom script context: https://kotlinlang.slack.com/archives/C0B8MA7FA/p1676989225653899?thread_ts=1676985449.906609&amp;cid=C0B8MA7FA could you elaborate how it could be achieved? the simplicity of the current approach is that it just works by specifying the shebang, no extra stuff is needed. I’m wondering how the API of the library would have to be changed for this to work
    a
    • 2
    • 19
  • p

    Piotr Krzemiński

    03/03/2023, 9:26 AM
    🚀 v0.38.0 released!
  • n

    Nikky

    03/16/2023, 2:26 PM
    is there any pattern in actions-typing or github-workflows-kt for modelling this kind of structured input? i would like to write builders that assemble this list of values with type safety ideally but … i see no way to neatly integrate that and scope it to just this action type..
    p
    • 2
    • 9
  • p

    Piotr Krzemiński

    03/17/2023, 1:31 PM
    🚀 v0.39.0 released!
  • p

    Piotr Krzemiński

    03/23/2023, 6:27 PM
    Hi folks, I'm considering making the library stable (1.0) soon-ish. Because I expect some increase of interest in using the library, I'd like to ensure that there's proper support for the library e. g. even if I'm not able to react to some bugs that need immediate attention. That's why I'm looking for a co-owner/co-Maintainer I can count on 😄 please let me know if you'd like to become one
    v
    l
    a
    • 4
    • 6
  • l

    LeoColman

    03/24/2023, 6:01 PM
    I often get these when editing files with Android Studio. Do you guys know what's the problem? 100% sure it's not library related, but maybe you faced this already
    j
    p
    • 3
    • 5
  • t

    Tech

    03/26/2023, 1:54 AM
    Hey, I was wondering if it was possible to run a maven publish workflow on github only when the project.version in the build.gradle.kts changes.
  • n

    Nikky

    03/26/2023, 2:00 AM
    i think the best way to do that might be to check if such a tag exists.. if not .. run the code and create and push the tag ?
  • n

    Nikky

    03/26/2023, 2:02 AM
    the comparison if project.version changed.. is something you could do with git hook scripts too…
  • t

    Tech

    03/26/2023, 2:43 AM
    yeah maybe tags are my best bet, I mainly just want it to be easier to update so if I just push my changes with an updated version GHA will automatically build and publish for me without me having to go in and create a tag with the same version etc.
    v
    a
    • 3
    • 4
Powered by Linen
Title
t

Tech

03/26/2023, 2:43 AM
yeah maybe tags are my best bet, I mainly just want it to be easier to update so if I just push my changes with an updated version GHA will automatically build and publish for me without me having to go in and create a tag with the same version etc.
v

Vampire

03/26/2023, 3:43 AM
That's not really a question for this channel. This channel is about the Kotlin lib that can generate the GitHub Workflow Yaml file. So you need to find out how to do it in regular Yaml files and then you can do it with this lib the same way.
But you can probably have a run-step that compares the version with the version in the parent commit and set an output of that run-step, then have all following steps depend on that output being set to a specific value or something like that.
a

Adam S

03/26/2023, 9:53 AM
you could try it the other way around and determine the project’s version based on the current git tag & branch, so there’s no need to edit a file https://github.com/qoomon/gradle-git-versioning-plugin
t

Tech

03/26/2023, 11:06 AM
Oh my apologies, I read the title of this channel and assumed it was related to CI/CD. But thank you for providing insight on my question anyways, I appreciate it
View count: 1