Skip to content

Commit

Permalink
fix: Fix github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
akak1977 committed Sep 5, 2022
1 parent 695d234 commit f2037f3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 19 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/main.yml → .github/workflows/module-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.1.13
# v3.200.16
name: Module CI

on:
Expand All @@ -11,6 +11,7 @@ on:
- 'README.md'
- 'LICENSE'
- '**/argoDeploy.json'
- '**/cloudDeploy.json'
- samples/**
branches:
[master, dev]
Expand All @@ -23,12 +24,15 @@ on:
- 'README.md'
- 'LICENSE'
- '**/argoDeploy.json'
- '**/cloudDeploy.json'
- samples/**

jobs:
ci:
if: ${{ github.actor != 'dependabot[bot]' && (github.event.pull_request.head.repo.full_name == github.repository || github.event.pull_request.head.repo.full_name == '') }} # Check that PR not from forked repo and not from Dependabot
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' &&
(github.event.pull_request.head.repo.full_name == github.repository ||
github.event.pull_request.head.repo.full_name == '') }} # Check that PR not from forked repo and not from Dependabot
runs-on: ubuntu-20.04
env:
CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}
CLIENT_ID: ${{secrets.CLIENT_ID}}
Expand All @@ -44,6 +48,7 @@ jobs:
outputs:
artifactUrl: ${{ steps.artifactUrl.outputs.download_url }}
jira-keys: ${{ steps.jira_keys.outputs.jira-keys }}
version: ${{ steps.artifact_ver.outputs.shortVersion }}
moduleId: ${{ steps.artifact_ver.outputs.moduleId }}

steps:
Expand All @@ -53,7 +58,7 @@ jobs:
run: |
echo "RELEASE_STATUS=true" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -207,7 +212,7 @@ jobs:
deploy:
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name == 'push' }}
needs: ci
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}
Expand Down Expand Up @@ -308,7 +313,7 @@ jobs:
environment-type: ${{ steps.deployConfig.outputs.environmentType }}

module-katalon-tests:
if: ${{ github.event_name == 'pull_request' }}
if: ${{ (github.ref == 'refs/heads/dev') && github.event_name == 'push' }}
needs: 'ci'
uses: VirtoCommerce/.github/.github/workflows/e2e.yml@main
with:
Expand All @@ -322,3 +327,19 @@ jobs:
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
katalonApiKey: ${{ secrets.KATALON_API_KEY }}

deploy-cloud-demo:
if: ${{ (github.ref == 'refs/heads/master') && github.event_name == 'push' }}
needs: ci
uses: VirtoCommerce/.github/.github/workflows/[email protected]
with:
releaseSource: module
releaseType: GithubReleases
moduleId: ${{ needs.ci.outputs.moduleId }}
moduleVer: ${{ needs.ci.outputs.version }}
argoServer: 'argo.virtocommerce.cloud'
matrix: '{"include":[{"envName": "prod", "confPath": "cloudDeploy.json"}]}'
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
argoLogin: ${{ secrets.ARGOCD_LOGIN }}
argoPassword: ${{ secrets.ARGOCD_PASSWORD }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v3.200.12
# v3.200.16
name: Release hotfix

on:
Expand All @@ -12,12 +12,12 @@ on:

jobs:
test:
uses: VirtoCommerce/.github/.github/workflows/[email protected].12
uses: VirtoCommerce/.github/.github/workflows/[email protected].16
secrets:
sonarToken: ${{ secrets.SONAR_TOKEN }}

build:
uses: VirtoCommerce/.github/.github/workflows/[email protected].12
uses: VirtoCommerce/.github/.github/workflows/[email protected].16
with:
uploadPackage: 'true'
uploadDocker: 'false'
Expand All @@ -27,7 +27,7 @@ jobs:
envPAT: ${{ secrets.REPO_TOKEN }}

get-metadata:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
outputs:
changelog: ${{ steps.changelog.outputs.changelog }}
steps:
Expand All @@ -43,7 +43,7 @@ jobs:
publish-github-release:
needs:
[build, test, get-metadata]
uses: VirtoCommerce/.github/.github/workflows/[email protected].12
uses: VirtoCommerce/.github/.github/workflows/[email protected].16
with:
fullKey: ${{ needs.build.outputs.packageFullKey }}
changeLog: '${{ needs.get-metadata.outputs.changeLog }}'
Expand All @@ -57,7 +57,7 @@ jobs:
needs:
[publish-github-release]
if: ${{ github.event.inputs.incrementPatch == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-nugets.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v3.200.13
# v3.200.16
name: Publish nuget

on:
Expand All @@ -12,12 +12,12 @@ on:

jobs:
test:
uses: VirtoCommerce/.github/.github/workflows/[email protected].13
uses: VirtoCommerce/.github/.github/workflows/[email protected].16
secrets:
sonarToken: ${{ secrets.SONAR_TOKEN }}

build:
uses: VirtoCommerce/.github/.github/workflows/[email protected].13
uses: VirtoCommerce/.github/.github/workflows/[email protected].16
with:
uploadPackage: 'true'
uploadDocker: 'false'
Expand All @@ -28,7 +28,7 @@ jobs:
publish-nuget:
needs:
[build, test]
uses: VirtoCommerce/.github/.github/workflows/[email protected].13
uses: VirtoCommerce/.github/.github/workflows/[email protected].16
with:
fullKey: ${{ needs.build.outputs.packageFullKey }}
forceGithub: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# v1.0.0
# v3.200.16
name: Release

on:
workflow_dispatch:

jobs:
release:
uses: VirtoCommerce/.github/.github/workflows/[email protected].12
uses: VirtoCommerce/.github/.github/workflows/[email protected].16
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
envPAT: ${{ secrets.REPO_TOKEN }}

0 comments on commit f2037f3

Please sign in to comment.