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

v2 new release #56

Merged
merged 9 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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