Refactoring Action for use with AKS Atlanta (#37)
* Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Grabbed the upstream integration tests and brought them here. Removed bash script. Added validateKubectl.py to /test folder for integration tests. * Ran npm run build * Ran npm run build * Updated on section for integration-tests.yml * Removing ruby commands from integration tests yaml. * Fixing discrepancies in integration test yaml. * Fixing discrepancies in integration test yaml. * Default to ubuntu-latest * renamed python script according to workflow. * renamed python script according to workflow. * Fixing path parameters. * Updated tsconfig.json * Testing for int test failure. * Validated that int tests work. * Added new workflows. * Testing release (#10) * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Grabbed the upstream integration tests and brought them here. Removed bash script. Added validateKubectl.py to /test folder for integration tests. * Ran npm run build * Ran npm run build * Updated on section for integration-tests.yml * Removing ruby commands from integration tests yaml. * Fixing discrepancies in integration test yaml. * Fixing discrepancies in integration test yaml. * Default to ubuntu-latest * renamed python script according to workflow. * renamed python script according to workflow. * Fixing path parameters. * Updated tsconfig.json * Testing for int test failure. * Validated that int tests work. * Added new workflows. Co-authored-by: Tommy Barnes <thbarnes@microsoft.com> * made changes reflected in comments Co-authored-by: Tommy Barnes <thbarnes@microsoft.com>
This commit is contained in:
parent
dae4b3de7f
commit
a10d84bc2e
16 changed files with 590 additions and 194 deletions
56
.github/workflows/release-pr.yml
vendored
Normal file
56
.github/workflows/release-pr.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: "Create release PR"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release:
|
||||
description: "Define release version (ex: v1, v2, v3)"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
createPullRequest:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check if remote branch exists
|
||||
env:
|
||||
BRANCH: releases/${{ github.event.inputs.release }}
|
||||
run: |
|
||||
echo "##[set-output name=exists;]$(echo $(if [[ -z $(git ls-remote --heads origin ${BRANCH}) ]]; then echo false; else echo true; fi;))"
|
||||
id: extract-branch-status
|
||||
# these two only need to occur if the branch exists
|
||||
- name: Checkout proper branch
|
||||
if: ${{ steps.extract-branch-status.outputs.exists == 'true' }}
|
||||
env:
|
||||
BRANCH: releases/${{ github.event.inputs.release }}
|
||||
run: git checkout ${BRANCH}
|
||||
- name: Reset promotion branch
|
||||
if: ${{ steps.extract-branch-status.outputs.exists == 'true' }}
|
||||
run: |
|
||||
git fetch origin main:main
|
||||
git reset --hard main
|
||||
- name: Install packages
|
||||
run: |
|
||||
rm -rf node_modules/
|
||||
npm install --no-bin-links
|
||||
npm run build
|
||||
- name: Remove node_modules from gitignore
|
||||
run: |
|
||||
sed -i '/node_modules/d' ./.gitignore
|
||||
- name: Create branch
|
||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: releases/${{ github.event.inputs.release }}
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Add node modules and new code for release
|
||||
title: ${{ github.event.inputs.release }} new release
|
||||
base: releases/${{ github.event.inputs.release }}
|
||||
branch: create-release
|
||||
delete-branch: true
|
Loading…
Add table
Add a link
Reference in a new issue