Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
754082016a | ||
|
4fa49eef32 | ||
|
7f0e861402 |
9 changed files with 165 additions and 30 deletions
58
.github/workflows/macos_action_test.yml
vendored
Normal file
58
.github/workflows/macos_action_test.yml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
name: Action test on MacOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 4 * * MON-FRI" # Runs at 04:00 UTC
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
macos-minimal:
|
||||||
|
runs-on: macos-latest
|
||||||
|
if: github.event_name != 'push'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- run: date > reports/macos_report_minimal.txt
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
|
||||||
|
macos-full:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- run: date > reports/macos_report_full.txt
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
with:
|
||||||
|
email: ${{ github.actor }}[bot]@users.noreply.github.com
|
||||||
|
name: ${{ github.actor }}
|
||||||
|
commit_message: macos full workflow
|
||||||
|
target_branch: macos
|
||||||
|
files: reports/macos_report_full.txt
|
||||||
|
remote_repository: origin
|
||||||
|
access_token: ${{ github.token }}
|
||||||
|
force: true
|
||||||
|
empty: true
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
macos-full-remote:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- run: date > reports/macos_report_full_remote.txt
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
with:
|
||||||
|
email: ${{ github.actor }}[bot]@users.noreply.github.com
|
||||||
|
name: ${{ github.actor }}
|
||||||
|
commit_message: macos full remote workflow
|
||||||
|
target_branch: macos
|
||||||
|
files: reports/macos_report_full_remote.txt
|
||||||
|
remote_repository: https://github.com/GuillaumeFalourd/poc-github-actions
|
||||||
|
access_token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
force: true
|
||||||
|
empty: true
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
macos-nochanges:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
32
.github/workflows/ubuntu_action_test.yml
vendored
32
.github/workflows/ubuntu_action_test.yml
vendored
|
@ -11,19 +11,19 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name != 'push'
|
if: github.event_name != 'push'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
- uses: actions/checkout@v2.3.4
|
||||||
- run: date > reports/ubuntu_report_minimal.txt
|
- run: date > reports/ubuntu_report_minimal.txt
|
||||||
- uses: https://w9r.dev/w9r.dev/action-git-commit-push@main
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
|
||||||
ubuntu-full:
|
ubuntu-full:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
- uses: actions/checkout@v2.3.4
|
||||||
- run: date > reports/ubuntu_report_full.txt
|
- run: date > reports/ubuntu_report_full.txt
|
||||||
- uses: https://w9r.dev/w9r.dev/action-git-commit-push@main
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
with:
|
with:
|
||||||
email: releasebot@w9r.dev
|
email: ${{ github.actor }}[bot]@users.noreply.github.com
|
||||||
name: ReleaseBot
|
name: ${{ github.actor }}
|
||||||
commit_message: ubuntu full workflow
|
commit_message: ubuntu full workflow
|
||||||
target_branch: ubuntu
|
target_branch: ubuntu
|
||||||
files: reports/ubuntu_report_full.txt
|
files: reports/ubuntu_report_full.txt
|
||||||
|
@ -33,8 +33,26 @@ jobs:
|
||||||
empty: true
|
empty: true
|
||||||
tags: true
|
tags: true
|
||||||
|
|
||||||
|
ubuntu-full-remote:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- run: date > reports/ubuntu_report_full_remote.txt
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
with:
|
||||||
|
email: ${{ github.actor }}[bot]@users.noreply.github.com
|
||||||
|
name: ${{ github.actor }}
|
||||||
|
commit_message: ubuntu full remote workflow
|
||||||
|
target_branch: ubuntu
|
||||||
|
files: reports/ubuntu_report_full_remote.txt
|
||||||
|
remote_repository: https://github.com/GuillaumeFalourd/poc-github-actions
|
||||||
|
access_token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
force: true
|
||||||
|
empty: true
|
||||||
|
tags: true
|
||||||
|
|
||||||
ubuntu-nochanges:
|
ubuntu-nochanges:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
- uses: actions/checkout@v2.3.4
|
||||||
- uses: GuillaumeFalourd/git-commit-push@main
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
|
58
.github/workflows/windows_action_test.yml
vendored
Normal file
58
.github/workflows/windows_action_test.yml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
name: Action test on Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 6 * * MON-FRI" # Runs at 06:00 UTC
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
windows-minimal:
|
||||||
|
runs-on: windows-latest
|
||||||
|
if: github.event_name != 'push'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- run: date > reports/windows_report_minimal.txt
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
|
||||||
|
windows-full:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- run: date > reports/windows_report_full.txt
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
with:
|
||||||
|
email: ${{ github.actor }}[bot]@users.noreply.github.com
|
||||||
|
name: ${{ github.actor }}
|
||||||
|
commit_message: windows full workflow
|
||||||
|
target_branch: windows
|
||||||
|
files: reports/windows_report_full.txt
|
||||||
|
remote_repository: origin
|
||||||
|
access_token: ${{ github.token }}
|
||||||
|
force: true
|
||||||
|
empty: true
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
windows-full-remote:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- run: date > reports/windows_report_full_remote.txt
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
||||||
|
with:
|
||||||
|
email: ${{ github.actor }}[bot]@users.noreply.github.com
|
||||||
|
name: ${{ github.actor }}
|
||||||
|
commit_message: windows full remote workflow
|
||||||
|
target_branch: windows
|
||||||
|
files: reports/windows_report_full_remote.txt
|
||||||
|
remote_repository: https://github.com/GuillaumeFalourd/poc-github-actions
|
||||||
|
access_token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
force: true
|
||||||
|
empty: true
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
windows-nochanges:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
- uses: GuillaumeFalourd/git-commit-push@main
|
|
@ -22,7 +22,7 @@ _**Note**: This action is supported on **all runners** operating systems (`ubunt
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2.3.4
|
||||||
# [...] --> steps with actions or commands updating repository files
|
# [...] --> steps with actions or commands updating repository files
|
||||||
- uses: GuillaumeFalourd/git-commit-push@v1.3
|
- uses: GuillaumeFalourd/git-commit-push@v1.3
|
||||||
```
|
```
|
||||||
|
@ -31,7 +31,7 @@ _**Note**: This action is supported on **all runners** operating systems (`ubunt
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2.3.4
|
||||||
# [...] --> steps with actions or commands updating repository files
|
# [...] --> steps with actions or commands updating repository files
|
||||||
- uses: GuillaumeFalourd/git-commit-push@v1.3
|
- uses: GuillaumeFalourd/git-commit-push@v1.3
|
||||||
with:
|
with:
|
||||||
|
@ -59,7 +59,7 @@ fatal: unable to access 'https://github.com/<owner>/<repository>/': The requeste
|
||||||
This can be resolved by adding `persist-credentials: false` and `fetch-depth: 0` to the workflow configurations when using the `actions/checkout`.
|
This can be resolved by adding `persist-credentials: false` and `fetch-depth: 0` to the workflow configurations when using the `actions/checkout`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal access token.
|
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal access token.
|
||||||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
|
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
|
||||||
|
|
29
action.yml
29
action.yml
|
@ -6,7 +6,7 @@ inputs:
|
||||||
email:
|
email:
|
||||||
description: Committer's email address
|
description: Committer's email address
|
||||||
required: true
|
required: true
|
||||||
default: ${{ github.actor }}@w9r.dev
|
default: ${{ github.actor }}@users.noreply.github.com
|
||||||
name:
|
name:
|
||||||
description: Committer's username
|
description: Committer's username
|
||||||
required: true
|
required: true
|
||||||
|
@ -44,6 +44,11 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: '0'
|
default: '0'
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
diff-output:
|
||||||
|
description: "Assert output"
|
||||||
|
value: ${{ steps.assert.outputs.result }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
@ -69,20 +74,22 @@ runs:
|
||||||
TAGS='--tags'
|
TAGS='--tags'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "machine w9r.dev" > "$HOME/.netrc"
|
echo "machine github.com" > "$HOME/.netrc"
|
||||||
echo " login $GITHUB_ACTOR" >> "$HOME/.netrc"
|
echo " login $GITHUB_ACTOR" >> "$HOME/.netrc"
|
||||||
echo " password ${{ inputs.access_token }}" >> "$HOME/.netrc"
|
echo " password ${{ inputs.access_token }}" >> "$HOME/.netrc"
|
||||||
|
|
||||||
echo "machine api.w9r.dev" >> "$HOME/.netrc"
|
echo "machine api.github.com" >> "$HOME/.netrc"
|
||||||
echo " login $GITHUB_ACTOR" >> "$HOME/.netrc"
|
echo " login $GITHUB_ACTOR" >> "$HOME/.netrc"
|
||||||
echo " password ${{ inputs.access_token }}" >> "$HOME/.netrc"
|
echo " password ${{ inputs.access_token }}" >> "$HOME/.netrc"
|
||||||
|
|
||||||
git config --local user.email "${{ inputs.email }}"
|
git config --local user.email "${{ inputs.email }}"
|
||||||
git config --local user.name "${{ inputs.name }}"
|
git config --local user.name "${{ inputs.name }}"
|
||||||
|
|
||||||
|
git fetch origin
|
||||||
|
|
||||||
if [[ `git status --porcelain` ]]; then
|
if [[ `git status --porcelain` ]]; then
|
||||||
git add ${{ inputs.files }} -v
|
git add ${{ inputs.files }} -v
|
||||||
git commit -S -m "${{ inputs.commit_message }}" $EMPTY
|
git commit -m "${{ inputs.commit_message }}" $EMPTY
|
||||||
git branch git-commit-push-action-${{ github.run_id }}-${{ github.job }}
|
git branch git-commit-push-action-${{ github.run_id }}-${{ github.job }}
|
||||||
git fetch "${{ inputs.remote_repository }}" "$CURRENT_BRANCH"
|
git fetch "${{ inputs.remote_repository }}" "$CURRENT_BRANCH"
|
||||||
git checkout "$CURRENT_BRANCH"
|
git checkout "$CURRENT_BRANCH"
|
||||||
|
@ -117,7 +124,7 @@ runs:
|
||||||
|
|
||||||
CLONE_DIRECTORY=$(mktemp -d)
|
CLONE_DIRECTORY=$(mktemp -d)
|
||||||
|
|
||||||
echo "##### Cloning destination W9r.dev repository #####"
|
echo "##### Cloning destination Github repository #####"
|
||||||
# Setup git
|
# Setup git
|
||||||
git config --global user.email "${{ inputs.email }}"
|
git config --global user.email "${{ inputs.email }}"
|
||||||
git config --global user.name "${{ inputs.name }}"
|
git config --global user.name "${{ inputs.name }}"
|
||||||
|
@ -125,7 +132,7 @@ runs:
|
||||||
git clone "https://${{ inputs.access_token }}@github.com/$DESTINATION_OWNER/$DESTINATION_REPOSITORY.git" "$CLONE_DIRECTORY"
|
git clone "https://${{ inputs.access_token }}@github.com/$DESTINATION_OWNER/$DESTINATION_REPOSITORY.git" "$CLONE_DIRECTORY"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "##### Copying contents to remote W9r.dev repository #####"
|
echo "##### Copying contents to remote Github repository #####"
|
||||||
echo ""##### Current repo content #####"
|
echo ""##### Current repo content #####"
|
||||||
ls -lha
|
ls -lha
|
||||||
cp -rvf ${{ inputs.files }} $CLONE_DIRECTORY
|
cp -rvf ${{ inputs.files }} $CLONE_DIRECTORY
|
||||||
|
@ -134,7 +141,7 @@ runs:
|
||||||
echo ""##### Remote repo content after copying files #####"
|
echo ""##### Remote repo content after copying files #####"
|
||||||
ls -la "$CLONE_DIRECTORY"
|
ls -la "$CLONE_DIRECTORY"
|
||||||
|
|
||||||
REMOTE_URL=https://$DESTINATION_OWNER:${{ inputs.access_token }}@w9r.dev/$DESTINATION_OWNER/$DESTINATION_REPOSITORY
|
REMOTE_URL=https://$DESTINATION_OWNER:${{ inputs.access_token }}@github.com/$DESTINATION_OWNER/$DESTINATION_REPOSITORY
|
||||||
git remote set-url origin $REMOTE_URL
|
git remote set-url origin $REMOTE_URL
|
||||||
git fetch origin
|
git fetch origin
|
||||||
|
|
||||||
|
@ -164,13 +171,13 @@ runs:
|
||||||
echo
|
echo
|
||||||
echo "WARNING: Couldn't read remote_repository URL input."
|
echo "WARNING: Couldn't read remote_repository URL input."
|
||||||
echo "ACCEPTED FORMAT:"
|
echo "ACCEPTED FORMAT:"
|
||||||
echo "git://w9r.dev/<owner>/<repo>.git"
|
echo "git://github.com/<owner>/<repo>.git"
|
||||||
echo "or"
|
echo "or"
|
||||||
echo "git@w9r.dev:<owner>/<repo>.git"
|
echo "git@github.com:<owner>/<repo>.git"
|
||||||
echo "or"
|
echo "or"
|
||||||
echo "https://w9r.dev/<owner>/<repo>.git"
|
echo "https://github.com/<owner>/<repo>.git"
|
||||||
echo "or"
|
echo "or"
|
||||||
echo "https://w9r.dev/<owner>/<repo>"
|
echo "https://github.com/<owner>/<repo>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"local>w9r.dev/renovate-config"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1 +1 @@
|
||||||
Tue Jan 7 04:16:41 UTC 2025
|
Fri Jan 27 04:14:32 UTC 2023
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Thu Feb 6 02:00:19 UTC 2025
|
Fri Jan 27 02:38:07 UTC 2023
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Tue Jan 7 06:28:00 CUT 2025
|
Fri Jan 27 06:21:27 CUT 2023
|
||||||
|
|
Loading…
Add table
Reference in a new issue