Skip to content

Commit

Permalink
v2 new release (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 3, 2022
1 parent 79d0935 commit 869bcf4
Show file tree
Hide file tree
Showing 18 changed files with 209,998 additions and 323 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Create release PR

on:
workflow_dispatch:
inputs:
release:
description: "Define release version (ex: v1, v2, v3)"
required: true

jobs:
release-pr:
uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main
with:
release: ${{ github.event.inputs.release }}
10 changes: 10 additions & 0 deletions .github/workflows/tag-and-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Tag and create release draft

on:
push:
branches:
- releases/*

jobs:
tag-and-release:
uses: OliverMKing/javascript-release-workflow/.github/workflows/tag-and-release.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- master
- main
- "releases/*"

jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,5 @@ ASALocalRun/
.secrets
event.json

# MacOS
.DS_Store
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: azure/k8s-create-secret@v2
with:
namespace: 'myapp'
secret-type: 'docker-registry'
secret-type: 'kubernetes.io/dockerconfigjson'
secret-name: 'contoso-cr'
string-data: ${{ secrets.SECRET_STRING_DATA}}
id: create-secret
Expand All @@ -37,7 +37,7 @@ jobs:
example-job:
runs-on: ubuntu-latest
steps:
- uses: azure/k8s-create-secret@v1
- uses: azure/k8s-create-secret@v2
with:
namespace: 'default'
secret-type: 'generic'
Expand Down
39 changes: 39 additions & 0 deletions lib/exec-child.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
if (require.main !== module) {
throw new Error('This file should not be required');
}

var childProcess = require('child_process');
var fs = require('fs');

var paramFilePath = process.argv[2];

var serializedParams = fs.readFileSync(paramFilePath, 'utf8');
var params = JSON.parse(serializedParams);

var cmd = params.command;
var execOptions = params.execOptions;
var pipe = params.pipe;
var stdoutFile = params.stdoutFile;
var stderrFile = params.stderrFile;

var c = childProcess.exec(cmd, execOptions, function (err) {
if (!err) {
process.exitCode = 0;
} else if (err.code === undefined) {
process.exitCode = 1;
} else {
process.exitCode = err.code;
}
});

var stdoutStream = fs.createWriteStream(stdoutFile);
var stderrStream = fs.createWriteStream(stderrFile);

c.stdout.pipe(stdoutStream);
c.stderr.pipe(stderrStream);
c.stdout.pipe(process.stdout);
c.stderr.pipe(process.stderr);

if (pipe) {
c.stdin.end(pipe);
}
Loading

0 comments on commit 869bcf4

Please sign in to comment.