Skip to content

Commit e0d54c7

Browse files
committed
Adding GH actions
1 parent ec61f42 commit e0d54c7

8 files changed

Lines changed: 52 additions & 274 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Suite
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- test.**
8+
- release.**
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Trigger dataplane publish workflow
15+
env:
16+
GH_TOKEN: ${{ secrets.C3PO_ACCESS_TOKEN }}
17+
run: |
18+
gh workflow run publish.yaml \
19+
--repo Observo-Inc/dataplane-build \
20+
--ref main \
21+
-f git_ref=${{ github.ref }} \
22+
-f channel=custom

.github/workflows/observo.test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Trigger Dataplane Test
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request_review:
6+
types: [submitted]
7+
push:
8+
branches:
9+
- master
10+
- pre_merge
11+
12+
jobs:
13+
trigger:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Trigger dataplane test workflow
17+
env:
18+
GH_TOKEN: ${{ secrets.C3PO_ACCESS_TOKEN }}
19+
run: |
20+
gh workflow run test.yml \
21+
--repo Observo-Inc/dataplane-build \
22+
--ref main \
23+
-f git_ref=${{ github.ref }}

.github/workflows/publish.yaml

Lines changed: 0 additions & 163 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/test_release.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

vdev/src/commands/release/github.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ impl Cli {
2121
.map_err(|e| anyhow!("failed to turn path into string: {:?}", e))?;
2222

2323
let version = util::get_version()?;
24+
let repo = util::get_repo()?;
2425
let mut command = Command::new("gh");
2526
command.in_repo();
2627
command.args(
2728
[
2829
"release",
2930
"--repo",
30-
"Observo-Inc/vector",
31+
repo.as_str(),
3132
"create",
3233
&format!("v{version}"),
3334
"--title",

vdev/src/util.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ pub fn get_version() -> Result<String> {
4040
.or_else(|_| read_version())
4141
}
4242

43+
pub fn get_repo() -> Result<String> {
44+
std::env::var("GH_RELEASE_REPO")
45+
.or_else(|_| Ok("Observo-Inc/vector".into()))
46+
}
47+
4348
pub fn git_head() -> Result<Output> {
4449
Command::new("git")
4550
.args(["describe", "--exact-match", "--tags", "HEAD"])

0 commit comments

Comments
 (0)