Skip to content
Closed

test #173

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
3 changes: 3 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.event.release.tag_name }}



19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test-CodeBuild

on: [pull_request, push]

jobs:
run-codebuild:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Run CodeBuild
uses: taoyong-ty/aws-codebuild-run-build@48c2aefe119fa3636b8e25bbd5e549829ca664b3
with:
project-name: aws-codebuild-run-build

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## AWS CodeBuild Run Build for GitHub Actions

### Making a local change

This action runs a [AWS CodeBuild][codebuild] [project][codebuild project]
as a step in a GitHub Actions workflow job.

Expand Down
25 changes: 22 additions & 3 deletions code-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ async function waitForBuildEndTime(
seqEmptyLogs = 0;
}
totalEvents += events.length;
console.log("========datetime: " + Date.now());
console.log("========total: " + totalEvents);
console.log("========seqEmptyLogs: " + seqEmptyLogs);
console.log("========current.endTime: " + current.endTime);
console.log("========nextForwardToken: " + nextForwardToken);

// stdout the CloudWatchLog (everyone likes progress...)
// CloudWatchLogs have line endings.
Expand Down Expand Up @@ -205,6 +210,13 @@ function githubInputs() {
: process.env[`GITHUB_SHA`]);

assert(sourceVersion, "No source version could be evaluated.");

const sourceTypeOverride =
core.getInput("source-type-override", { required: false, }) || undefined;

const sourceLocationOverride =
core.getInput("source-location-override", { required: false }) || undefined;

const buildspecOverride =
core.getInput("buildspec-override", { required: false }) || undefined;

Expand Down Expand Up @@ -260,6 +272,8 @@ function githubInputs() {
owner,
repo,
sourceVersion,
sourceTypeOverride,
sourceLocationOverride,
buildspecOverride,
computeTypeOverride,
environmentTypeOverride,
Expand All @@ -282,6 +296,8 @@ function inputs2Parameters(inputs) {
owner,
repo,
sourceVersion,
sourceTypeOverride,
sourceLocationOverride,
buildspecOverride,
computeTypeOverride,
environmentTypeOverride,
Expand All @@ -295,9 +311,12 @@ function inputs2Parameters(inputs) {

const sourceOverride = !disableSourceOverride
? {
sourceVersion: sourceVersion,
sourceTypeOverride: "GITHUB",
sourceLocationOverride: `https://github.com/${owner}/${repo}.git`,
// sourceVersion should not be set when using sourceTypeOverride or sourceLocationOverride
...(sourceTypeOverride || sourceLocationOverride
? {}
: {sourceVersion}),
sourceTypeOverride: sourceTypeOverride || "GITHUB",
sourceLocationOverride: sourceLocationOverride || `https://github.com/${owner}/${repo}.git`,
}
: {};

Expand Down
25 changes: 22 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ async function waitForBuildEndTime(
seqEmptyLogs = 0;
}
totalEvents += events.length;
console.log("========datetime: " + Date.now());
console.log("========total: " + totalEvents);
console.log("========seqEmptyLogs: " + seqEmptyLogs);
console.log("========current.endTime: " + current.endTime);
console.log("========nextForwardToken: " + nextForwardToken);

// stdout the CloudWatchLog (everyone likes progress...)
// CloudWatchLogs have line endings.
Expand Down Expand Up @@ -211,6 +216,13 @@ function githubInputs() {
: process.env[`GITHUB_SHA`]);

assert(sourceVersion, "No source version could be evaluated.");

const sourceTypeOverride =
core.getInput("source-type-override", { required: false, }) || undefined;

const sourceLocationOverride =
core.getInput("source-location-override", { required: false }) || undefined;

const buildspecOverride =
core.getInput("buildspec-override", { required: false }) || undefined;

Expand Down Expand Up @@ -266,6 +278,8 @@ function githubInputs() {
owner,
repo,
sourceVersion,
sourceTypeOverride,
sourceLocationOverride,
buildspecOverride,
computeTypeOverride,
environmentTypeOverride,
Expand All @@ -288,6 +302,8 @@ function inputs2Parameters(inputs) {
owner,
repo,
sourceVersion,
sourceTypeOverride,
sourceLocationOverride,
buildspecOverride,
computeTypeOverride,
environmentTypeOverride,
Expand All @@ -301,9 +317,12 @@ function inputs2Parameters(inputs) {

const sourceOverride = !disableSourceOverride
? {
sourceVersion: sourceVersion,
sourceTypeOverride: "GITHUB",
sourceLocationOverride: `https://github.com/${owner}/${repo}.git`,
// sourceVersion should not be set when using sourceTypeOverride or sourceLocationOverride
...(sourceTypeOverride || sourceLocationOverride
? {}
: {sourceVersion}),
sourceTypeOverride: sourceTypeOverride || "GITHUB",
sourceLocationOverride: sourceLocationOverride || `https://github.com/${owner}/${repo}.git`,
}
: {};

Expand Down
Loading