-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (78 loc) · 2.55 KB
/
test-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: test-action
on:
push:
workflow_dispatch:
inputs:
src_repository:
description: Source Repository - {owner}/{repo_name}
required: true
src_workflow_name:
description: Source Workflow Name
required: true
src_sha:
description: Source Repository SHA - GITHUB_SHA
required: true
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- TEST_NAME: "Latest v2"
AWS_CLI_VERSION: "2"
- TEST_NAME: "Specific v2"
AWS_CLI_VERSION: "2.0.30"
- TEST_NAME: "Latest v1"
AWS_CLI_VERSION: "1"
- TEST_NAME: "Specific v1"
AWS_CLI_VERSION: "1.18.1"
- TEST_NAME: "No Input"
- TEST_NAME: "WORKDIR v1"
WORKDIR: "/tmp/unfor19-awscli"
AWS_CLI_VERSION: "1"
- TEST_NAME: "WORKDIR v2"
WORKDIR: "/tmp/unfor19-awscli"
AWS_CLI_VERSION: "2"
- TEST_NAME: "ROOTDIR v1"
ROOTDIR: "/tmp"
AWS_CLI_VERSION: "1"
- TEST_NAME: "ROOTDIR v2"
ROOTDIR: "/tmp"
AWS_CLI_VERSION: "2"
- TEST_NAME: "BINDIR v2"
AWS_CLI_VERSION: "2"
BINDIR: "/tmp/aws/bin"
- TEST_NAME: "INSTALLROOTDIR v2"
AWS_CLI_VERSION: "2"
INSTALLROOTDIR: "/tmp/aws"
name: Test ${{ matrix.TEST_NAME }} ${{ matrix.AWS_CLI_VERSION }}
steps:
- name: Test ${{ matrix.TEST_NAME }}
id: install-aws-cli
uses: unfor19/install-aws-cli-action@master
with:
version: ${{ matrix.AWS_CLI_VERSION }}
rootdir: ${{ matrix.ROOTDIR }}
workdir: ${{ matrix.WORKDIR }}
- run: aws --version
shell: bash
outputs:
target_job_status: ${{ job.status }}
update-status-check:
name: Update Status Check In Source Repository
runs-on: ubuntu-20.04
needs:
- test # Change if necessary
if: ${{ always() }}
steps:
- name: Status Update Action Repo
uses: unfor19/hero-action@master
with:
action: "status-update"
gh_token: ${{ secrets.GH_TOKEN }} # scope: repo + workflow
src_repository: ${{ github.event.inputs.src_repository }}
src_workflow_name: ${{ github.event.inputs.src_workflow_name }}
src_sha: ${{ github.event.inputs.src_sha }}
target_repository: ${{ github.repository }}
target_job_status: ${{ needs.test.outputs.target_job_status }}
target_run_id: ${{ github.run_id }}