update #15769
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update | |
on: | |
schedule: | |
- cron: '5 * * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Target | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
path: target | |
- name: Clone Source | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ secrets.PROJECT_SOURCE_GIT_URL }} | |
ref: master | |
token: ${{ secrets.TOKEN }} | |
path: source | |
submodules: 'true' | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v3.0.3 | |
with: | |
dotnet-version: 6.0 | |
- name: Execute Update | |
run: | | |
dotnet run --project source | |
cd target | |
git config --local user.email "m67186636@gmail.com" | |
git config --local user.name "m67186636" | |
git commit -a -m "Update All Exchange Rate" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
directory: target |