-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.73 KB
/
main.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
name: GHA Capabilities
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
id: checkout
with:
fetch-depth: 0
- name: Get changes
id: changed-files
run: |
echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
- name: List changed files
run: |
for file in ${{ steps.changed-files.outputs.changed_files }}; do
echo "$file was changed"
done
- name: Get Event Context properies
run: |
echo "Event: ${{ github.event }}"
echo "Event Name: ${{ github.event_name }}"
echo "Repository: ${{ github.repository }}"
echo "Commit SHA: ${{ github.sha }}"
echo "Commit Ref: ${{ github.ref }}"
echo "Head Ref: ${{ github.head_ref }}"
echo "Base Ref: ${{ github.base_ref }}"
echo "Triggered by: ${{ github.actor }}"
echo "Workflow: ${{ github.workflow }}"
echo "PR: ${{ github.pull_request }}"
- name: Trigger dot-cli
uses: ./actions/dot-cli
id: dot-cli
with:
command: 'ct'
sub-command: 'pull'
default-action-arg: 'FileAsset'
option: '--workspace'
option-value: '/github/workspace/contents/'
option-verbose: '--verbose'
- name: Commit and push
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add $GITHUB_WORKSPACE/contents
git commit -m "pushing changes"
git push