github action #19
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: Copy and Commit | |
on: | |
push: | |
branches: | |
- feature/SM15-38 # Adjust the branch as needed | |
jobs: | |
copy-and-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout model2owl repository | |
uses: actions/checkout@v2 | |
- name: Copy folder to destination repository | |
run: | | |
cd .. | |
pwd | |
ls -la | |
mkdir destination-repo | |
ls -la | |
echo "directory to copy src folder was created" | |
cp -r model2owl/src destination-repo | |
ls -la destination-repo | |
ls -la destination-repo/src | |
- name: Configure Git | |
run: | | |
git config --global user.email "action@github.com" | |
git config --global user.name "github-actions" | |
- name: Checkout model2owl validator repository | |
uses: actions/checkout@v2 | |
with: | |
repository: meaningfy-ws/model2owl-validator | |
token: ${{ secrets.GIT_USER }} | |
- name: second clone | |
run: | | |
ls -la | |
- name: Copy folder to destination repository | |
run: | | |
pwd | |
ls -la | |
cd .. | |
ls -la | |
cp -r destination-repo/src model2owl/resources/ | |
cd model2owl/resources | |
ls -la | |
# - name: commit files | |
# id: commit | |
# run: | | |
# git status | |
# | |
# git add . | |
# if [ -z "$(git status --porcelain)" ]; then | |
# echo "::set-output name=push::false" | |
# else | |
# git commit -m "Adding convention report and glossary files" | |
# echo "::set-output name=push::true" | |
# fi | |
# shell: bash | |
# | |
# - name: Push changes | |
# if: steps.commit.outputs.push == 'true' | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# branch: main | |
- name: Commit and Push to destination repository | |
run: | | |
git add . | |
git commit -m "Copy src folder from model2owl repository" | |
git status | |
git remote -v | |
git push -f https://${{ secrets.GIT_USER }}@github.com/meaningfy-ws/model2owl-validator.git main | |
# git push -f origin main |