From 8b923170224fce1fba2945b8bbc233373008d8b8 Mon Sep 17 00:00:00 2001 From: shivam Date: Tue, 12 Mar 2024 04:18:35 +0530 Subject: [PATCH 1/2] Modifying the Github actions file Signed-off-by: shivam --- .github/workflows/skeletor.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/skeletor.yml diff --git a/.github/workflows/skeletor.yml b/.github/workflows/skeletor.yml new file mode 100644 index 0000000..22f3254 --- /dev/null +++ b/.github/workflows/skeletor.yml @@ -0,0 +1,33 @@ +name: porter/skeletor +on: + push: + branches: + - main + - v* + pull_request: + branches: + - main +env: + PORTER_PACKAGE_REMOTE: https://github.com/getporter/test-packages.git + PORTER_RELEASE_REPOSITORY: github.com/getporter/skeletor + GOVERSION: 1.19.2 +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + go-version: "${{ env.GOVERSION }}" + cache: true + - name: Configure Agent + run: go run mage.go ConfigureAgent + - name: Test + run: mage Test + - name: Cross Compile + run: mage XBuildAll + - name: Publish + if: success() && github.event_name != 'PullRequest' + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + run: mage Publish \ No newline at end of file From 672794b6487677576872fc459ce84a7d2e2987d0 Mon Sep 17 00:00:00 2001 From: shivam Date: Wed, 13 Mar 2024 11:57:12 +0530 Subject: [PATCH 2/2] Created 2 workflows files one on push and another one on pull request Signed-off-by: shivam --- .github/workflows/skeletor-pullreq.yml | 29 +++++++++++++++++++ .../{skeletor.yml => skeletor-push.yml} | 3 -- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/skeletor-pullreq.yml rename .github/workflows/{skeletor.yml => skeletor-push.yml} (94%) diff --git a/.github/workflows/skeletor-pullreq.yml b/.github/workflows/skeletor-pullreq.yml new file mode 100644 index 0000000..ebd3eec --- /dev/null +++ b/.github/workflows/skeletor-pullreq.yml @@ -0,0 +1,29 @@ +name: porter/skeletor +on: + pull_request: + branches: + - main +env: + PORTER_PACKAGE_REMOTE: https://github.com/getporter/test-packages.git + PORTER_RELEASE_REPOSITORY: github.com/getporter/skeletor + GOVERSION: 1.19.2 +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + go-version: "${{ env.GOVERSION }}" + cache: true + - name: Configure Agent + run: go run mage.go ConfigureAgent + - name: Test + run: mage Test + - name: Cross Compile + run: mage XBuildAll + - name: Publish + if: success() && github.event_name != 'PullRequest' + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + run: mage Publish \ No newline at end of file diff --git a/.github/workflows/skeletor.yml b/.github/workflows/skeletor-push.yml similarity index 94% rename from .github/workflows/skeletor.yml rename to .github/workflows/skeletor-push.yml index 22f3254..a62b2f5 100644 --- a/.github/workflows/skeletor.yml +++ b/.github/workflows/skeletor-push.yml @@ -4,9 +4,6 @@ on: branches: - main - v* - pull_request: - branches: - - main env: PORTER_PACKAGE_REMOTE: https://github.com/getporter/test-packages.git PORTER_RELEASE_REPOSITORY: github.com/getporter/skeletor