Skip to content

feat: add fail-fast #81

feat: add fail-fast

feat: add fail-fast #81

name: Push languages files to private repositories
on:
push:
branches:
- main
jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
-
name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
-
name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files_ignore: .github/**
json: true
-
name: Set matrix value
id: set-matrix
run: echo "::set-output name=matrix::${{ steps.changed-files.outputs.all_changed_files }}}"
push:
needs: [ setup ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
value: ${{fromJson(needs.setup.outputs.matrix)}}
steps:
-
name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
-
name: Extract folder name of the path
id: folder-name
run: |
echo "REPOSITORY=$(echo "${{ matrix.value }}" | cut -d'/' -f 1)" >> $GITHUB_ENV
echo "TARGET_FOLDER=$(echo "${{ matrix.value }}" | cut -d'/' -f 2- | rev | cut -d '/' -f 2- | rev)" >> $GITHUB_ENV
-
name: Push file
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.PAT }}
with:
source_file: ${{ matrix.value }}
destination_repo: ${{ github.REPOSITORY_OWNER }}/${{ env.REPOSITORY }}
destination_folder: lua/${{ env.TARGET_FOLDER }}
user_email: [email protected]
user_name: github-actions
commit_message: Synchronize language from public repository
destination_branch: develop