fix remote repo pushing
All checks were successful
/ push-to-remote (push) Successful in 11s

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

View File

@ -10,15 +10,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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 }}
uses: actions/checkout@v3
with:
source-directory: 'frontend'
destination-github-username: 'moll-re'
destination-repository-name: 'anyway-frontend-builder'
user-email: me@moll.re
target-branch: main
path: 'src'
- name: Checkout remote repository
uses: actions/checkout@v3
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

@ -5,12 +5,12 @@ on:
jobs:
build:
runs-on: macos-lastest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up ruby env
uses: ruby/setup-ruby@v1.138.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.1
bundler-cache: true
@ -22,7 +22,7 @@ jobs:
distribution: 'zulu'
- name: Setup android SDK
uses: https://github.com/android-actions/setup-android@v3
uses: android-actions/setup-android@v3
- name: Infer version number from git tag
id: version
@ -30,10 +30,17 @@ jobs:
REF_NAME: ${{ github.ref_name }}
run:
# remove the 'v' prefix from the tag name
echo "VERSION=${REF_NAME//v}" >> $GITHUB_ENV
echo "VERSION=${REF_NAME//v}" >> $GITHUB_OUTPUT
- name: Load secrets from github
run: |
echo ${{ secrets.ANDROID_SECRET_PROPERTIES }} > secrets.properties
echo ${{ secrets.ANDROID_KEYSTORE }} > release.keystore
echo ${{ secrets.ANDROID_GOOGLE_PLAY_JSON }} > google-key.json
working-directory: android
- name: Run fastlane lane
run: bundle exec fastlane deploy
working-directory: android
env:
VERSION_NAME: ${{outputs.version.VERSION}}
VERSION_NAME: ${{ steps.version.VERSION }}