Skip to content

Commit

Permalink
first test
Browse files Browse the repository at this point in the history
  • Loading branch information
aalves08 committed Nov 8, 2024
1 parent 99285c9 commit 8789d65
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/build-extension-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
tagged_release:
required: true
type: string
is_test:
required: false
type: string
test_repo:
required: false
type: string
test_branch:
required: false
type: string

env:
ACTIONS_RUNNER_DEBUG: false
Expand All @@ -27,7 +36,16 @@ jobs:
actions: write
contents: read
steps:
- name: Checkout
- if: is_test == 'true'
name: Checkout (test flow)
uses: actions/checkout@v4
with:
repository: rancher/${{ inputs.test_repo }}
ref: ${{ inputs.test_branch }}
fetch-depth: 0

- if: is_test != 'true'
name: Checkout (normal flow)
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down Expand Up @@ -83,7 +101,7 @@ jobs:

release:
name: Release Build
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') || inputs.is_test != 'true'
needs: build-extension-artifact
runs-on: ubuntu-latest
permissions:
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/test-extension-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Test Extension workflows

# on:
# workflow_dispatch:
# release:
# types: [released]

# defaults:
# run:
# shell: bash
# working-directory: ./

# jobs:
# build-extension-charts:
# uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master
# permissions:
# actions: write
# contents: write
# deployments: write
# pages: write
# with:
# target_branch: gh-pages
# tagged_release: ${{ github.ref_name }}

on:
workflow_dispatch: # to be removed for PROD
schedule:
- cron: "0 0 * * *"

defaults:
run:
shell: bash
working-directory: ./

jobs:
test-extension-workflows:
strategy:
matrix:
workflows: [
{ org: 'aalves08', name: 'build-extension-charts', target_branch: 'gh-pages', tagged_release: 'clock-0.3.2', is_test: 'true', test_repo: 'ui-plugin-examples', test_branch: 'main' }
]
# branch: ['master']
branch: ['12032-reusable-wf-tests']
# uses: rancher/dashboard/.github/workflows/${{ matrix.workflows.name }}.yml@${{ matrix.branch }}
name: Running ${{ matrix.workflows.name }} - ${{ matrix.branch }}
uses: ${{ matrix.workflows.org }}/dashboard/.github/workflows/${{ matrix.workflows.name }}.yml@${{ matrix.branch }}
permissions:
actions: write
contents: write
deployments: write
pages: write
with:
target_branch: ${{ matrix.workflows.target_branch }}
tagged_release: ${{ matrix.workflows.tagged_release }}
is_test: ${{ matrix.workflows.is_test }}
test_repo: ${{ matrix.workflows.test_repo }}
test_branch: ${{ matrix.workflows.test_branch }}

# runs-on: ubuntu-latest
# steps:
# - name: Running ${{ matrix.workflows.name }} - ${{ matrix.branch }}
# uses: ${{ matrix.workflows.org }}/dashboard/.github/workflows/${{ matrix.workflows.name }}.yml@${{ matrix.branch }}
# permissions:
# actions: write
# contents: write
# deployments: write
# pages: write
# with:
# target_branch: ${{ matrix.workflows.target_branch }}
# tagged_release: ${{ matrix.workflows.tagged_release }}
# is_test: ${{ matrix.workflows.is_test }}
# test_repo: ${{ matrix.workflows.test_repo }}
# test_branch: ${{ matrix.workflows.test_branch }}


0 comments on commit 8789d65

Please sign in to comment.