Skip to content

Commit 022f6e0

Browse files
authored
Update main.yml
1 parent 141529e commit 022f6e0

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

.github/workflows/main.yml

+26-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1-
name: Tetap Nyala
1+
name: Download and Commit File
22

33
on:
4-
repository_dispatch:
5-
workflow_dispatch:
4+
workflow_dispatch:
5+
inputs:
6+
file_link:
7+
description: 'Link to the file'
8+
required: true
69

710
jobs:
8-
build:
9-
runs-on: ubuntu-latest
11+
download-commit:
12+
runs-on: ubuntu-latest
1013

11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v3
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
1417

15-
- name: Upload coverage reports to Codecov
16-
uses: codecov/codecov-action@v3
17-
env:
18-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
18+
- name: Download file
19+
run: |
20+
curl -O ${{ github.event.inputs.file_link }}
21+
22+
- name: Commit file
23+
run: |
24+
git config --local user.email "[email protected]"
25+
git config --local user.name "GitHub Action"
26+
git add .
27+
git commit -m "Add downloaded file"
28+
29+
- name: Push changes
30+
uses: ad-m/[email protected]
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)