fix remote repo pushing
Some checks failed
/ push-to-remote (push) Has been cancelled

This commit is contained in:
Remy Moll 2024-09-18 17:04:21 +02:00
parent 205ec37764
commit 34b64e6beb
2 changed files with 28 additions and 13 deletions

View File

@ -10,15 +10,30 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Push to github remote
uses: https://github.com/actions/cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_API_TOKEN }}
with: with:
source-directory: 'frontend' path: 'src'
destination-github-username: 'moll-re'
destination-repository-name: 'anyway-frontend-builder' - name: Checkout remote repository
user-email: me@moll.re uses: actions/checkout@v3
target-branch: main with:
path: 'dest'
ref: 'main'
github-server-url: 'https://github.com'
repository: 'moll-re/anyway-frontend-builder'
token: ${{ secrets.PUSH_GITHUB_API_TOKEN }}
fetch-depth: 0
persist-credentials: true
- name: Copy files to remote repository
run: cp -r src/frontend/. dest/
- name: Commit and push changes
run: |
cd dest
git config --global user.email "me@moll.re"
git config --global user.name "[bot]"
git add .
git commit -m "Automatic code update for tag"
git tag -a ${{ github.ref_name }} -m "mirrored tag"
git push origin main --tags

View File

@ -30,10 +30,10 @@ jobs:
REF_NAME: ${{ github.ref_name }} REF_NAME: ${{ github.ref_name }}
run: run:
# remove the 'v' prefix from the tag name # remove the 'v' prefix from the tag name
echo "VERSION=${REF_NAME//v}" >> $GITHUB_ENV echo "VERSION=${REF_NAME//v}" >> $GITHUB_OUTPUT
- name: Run fastlane lane - name: Run fastlane lane
run: bundle exec fastlane deploy run: bundle exec fastlane deploy
working-directory: android working-directory: android
env: env:
VERSION_NAME: ${{outputs.version.VERSION}} VERSION_NAME: ${{ steps.version.VERSION }}