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

docs: update github actions workflow example #2195

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 8 additions & 12 deletions docs/tests/getting-started/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ env:
# This needs to be unique across all of netlify.app
APP_NAME: todoapp-dagger-europa
NETLIFY_TEAM: dagger
# Get one from https://app.netlify.com/user/applications/personal
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
# GitHub Actions friendly logs
DAGGER_LOG_FORMAT: plain
gerhard marked this conversation as resolved.
Show resolved Hide resolved

jobs:
dagger:
Expand All @@ -24,15 +20,15 @@ jobs:
uses: actions/checkout@v2

# You need to run `dagger project init` locally before and commit the cue.mod directory to the repository with its contents
- name: Project update
uses: dagger/dagger-for-github@v2
with:
version: 0.2
# To pin external dependencies, you can use `project update github.com/[package-source]@v[n]`
args: project update

- name: Deploy to Netlify
uses: dagger/dagger-for-github@v2
# See all options at https://github.com/dagger/dagger-for-github
with:
args: do deploy
version: 0.2
# To pin external dependencies, you can use `project update github.com/[package-source]@v[n]`
cmds: |
project update
do deploy
Comment on lines +29 to +31
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

@crazy-max crazy-max Apr 14, 2022

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

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

env:
# Get one from https://app.netlify.com/user/applications/personal
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
gerhard marked this conversation as resolved.
Show resolved Hide resolved