-
Notifications
You must be signed in to change notification settings - Fork 556
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
docs: update github actions workflow example #2195
Conversation
cmds: | | ||
project update | ||
do deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this pattern.
What happens when project update
fails? Before this, the step would make it clear why it failed, but now I don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If project update
fails then it will exit immediately and don't process the next command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is what it looks like with collapsible groups to split logs per cmd: https://github.com/dagger/dagger-for-github/runs/6022757575?check_suite_focus=true#step:3:12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good! How does it look when project update
fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like where this is going! It must wait for #2172 however. There are a few changes coming, and updating the actual workflow is just as important: https://github.com/dagger/dagger/pull/2172/files#diff-472b1b8ec4b92806685394e7aad78734b8ca06feaa04491d31adfd51e5ebba95 |
Looking at https://github.com/dagger/dagger/blob/main/.github/workflows/todoapp.yml and my comment in dagger/dagger-for-github#35 (comment), it could be done with only one step: name: todoapp
on:
push:
branches:
- main
paths:
- '.github/workflows/todoapp.yml'
- 'pkg/universe.dagger.io/examples/todoapp/**'
env:
# This needs to be unique across all of Netlify
APP_NAME: todoapp-dagger-europa
NETLIFY_TEAM: blocklayer
# https://app.netlify.com/user/applications/personal
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
DAGGER_LOG_FORMAT: plain
jobs:
dagger:
name: "Deploy todoapp to Netlify"
runs-on: ubuntu-latest
steps:
- name: "Clone repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Dagger
uses: dagger/dagger-for-github@v2
with:
version: ${{ github.repositoryUrl }}#${{ github.ref }}
cmds: do deploy
workdir: pkg/universe.dagger.io/examples/todoapp |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
5fbc281
to
daf016c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Thanks to a great community contribution, we are improving the GitHub Actions integration further. We should probably do the same for the GitLab integration doc as a follow-up to this. Follow-up to dagger#1962 Uses improvements from dagger#2195 Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
Thanks to a great community contribution, we are improving the GitHub Actions integration further. We should probably do the same for the GitLab integration doc as a follow-up to this. Follow-up to dagger#1962 Uses improvements from dagger#2195 Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
Thanks to a great community contribution, we are improving the GitHub Actions integration further. We should probably do the same for the GitLab integration doc as a follow-up to this. Follow-up to dagger#1962 Uses improvements from dagger#2195 Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
With the upcoming release of our GitHub Actions,
args
has been replaced withcmds
input allowing multi dagger commands within a single step.Signed-off-by: CrazyMax crazy-max@users.noreply.github.com