ci: test auto fetch #8
Workflow file for this run
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: Fetch data | |
on: | |
push: | |
branches: [dev] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Fetch data | |
run: echo Hello | |
- name: Configure git | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Commit fetched data | |
id: commit_fetched | |
continue-on-error: true | |
run: echo Hello | |
- name: Push to default branch | |
run: git push | |
- name: Extract user data | |
id: extract | |
if: ${{ steps.commit_fetched.outcome == 'success' }} | |
run: echo Hello | |
- name: Commit extracted user | |
if: ${{ steps.extract.outcome == 'success' }} | |
run: | | |
git add -f public/users/ | |
git commit -m "Extract user data" | |
- name: Push to dist | |
if: ${{ steps.extract.outcome == 'success' }} | |
run: git push -f origin main:dist |