Skip to content

Commit

Permalink
modify config for test
Browse files Browse the repository at this point in the history
  • Loading branch information
umegaya committed Feb 8, 2024
1 parent 01871f4 commit c54110d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deplo-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deplo Workflow Runner
on:
push:
branches: ["lab","main"]
tags: ["[0-9]*"]
tags: ["[0-9]*","test-[0-9]*"]
pull_request:
branches: ["lab","main"]
repository_dispatch:
Expand Down
18 changes: 13 additions & 5 deletions Deplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ nightly = { patterns = ["main"] }
lab = { patterns = ["lab"] }
# tag which name is started with numerals treated as release (eg. 0.1.10)
prod = { tag = true, patterns = ["[0-9]*"] }
# tag behaviour test
taglab = { tag = true, patterns = ["test-[0-9]*"]}


# ------------
Expand Down Expand Up @@ -244,7 +246,7 @@ commit = [
]

[jobs.product]
on = { workflows = ["deploy"], changed = ["*/src/*", "Cargo.*"] }
on = { workflows = ["deploy"], release_targets = ["prod","nightly"], changed = ["*/src/*", "Cargo.*"] }
# job dependencies. deploy.product only starts to run after deploy.builder finished.
depends = ["builder"]
runner = { os = "linux", local_fallback = { path = "tools/docker/Dockerfile.vmfb", shell = "sh" } }
Expand Down Expand Up @@ -299,7 +301,7 @@ docker push ghcr.io/suntomi/deplo:latest
"""

[jobs.mac]
on = { workflows = ["deploy"], changed = ["*/src/*", "Cargo.*"] }
on = { workflows = ["deploy"], release_targets = ["prod","nightly"], changed = ["*/src/*", "Cargo.*"] }
depends = ["product"]
runner = { os = "macos" }
steps = [{
Expand Down Expand Up @@ -367,7 +369,7 @@ caches.cargo = {
}

[jobs.win]
on = { workflows = ["deploy"], changed = [".*/src/.*", 'Cargo\.*'], diff_matcher = "regex" }
on = { workflows = ["deploy"], release_targets = ["prod","nightly"], changed = [".*/src/.*", 'Cargo\.*'], diff_matcher = "regex" }
depends = ["product"]
runner = { os = "windows" }
command = """
Expand All @@ -393,13 +395,19 @@ caches = {
}

[jobs.dispatched]
on = { workflows = ["manual_dispatch", "webapi_dispatch"] }
on = { workflows = ["manual_dispatch", "webapi_dispatch", "taglab"] }
runner = { os = "linux", local_fallback = { image = "ghcr.io/suntomi/images:aws", shell = "sh" } }
checkout = { fetch_depth = 0 }
command = """
set -e
git branch -a
git log --no-pager
git --no-pager log | head -20
if [ "${DEPLO_CI_RELEASE_TARGET}" = "nightly" ]; then
echo "boom"
exit 1
else
echo "ok: ${DEPLO_CI_RELEASE_TARGET}"
fi
echo "======================="
echo "dispatch context = ${DEPLO_CI_WORKFLOW_CONTEXT}"
echo "======================="
Expand Down

0 comments on commit c54110d

Please sign in to comment.