Skip to content

Commit

Permalink
Merge pull request #507 from kosenda/feature/use-circleci3
Browse files Browse the repository at this point in the history
[CI] use circleci 2
  • Loading branch information
kosenda authored Mar 20, 2024
2 parents 872de16 + 535d756 commit d4e866a
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 341 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:
git add -f $file
done
$(date +%s) >> timestamp
echo $(date +%s) >> timestamp
git add timestamp
git commit -m "Add screenshot diff"
Expand Down
134 changes: 67 additions & 67 deletions .github/workflows_disable/SaveScreenshot.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
## ref: https://github.com/kosenda/hiragana-converter/blob/develop/REFERENCE.md
#
#name: SaveScreenshot
#
#on:
# pull_request:
# types:
# - closed
# paths-ignore:
# - README.md
#
#jobs:
# save-screenshot:
# if: github.event.pull_request.merged == true
# runs-on: ubuntu-latest
# steps:
# - name: Checkout sources
# uses: actions/checkout@v4
#
# - name: Setup
# uses: ./.github/actions/setup
# with:
# api-key: ${{ secrets.API_KEY }}
#
# - name: create screenshots
# run: ./gradlew recordRoborazziProdDebug --stacktrace
#
# - name: Upload screenshots
# uses: actions/upload-artifact@v4
# with:
# name: screenshots
# path: ./app/build/outputs/roborazzi/
# retention-days: 1
#
# - name: Save screenshots branch name
# run: echo "SCREENSHOTS_BRANCH_NAME=screenshots_${{ github.base_ref }}" >> $GITHUB_ENV
#
# - name: Checkout main branch
# uses: actions/checkout@v4
# with:
# ref: main
#
# - name: Checkout screenshots branch
# run: |
# git branch -D ${{ env.SCREENSHOTS_BRANCH_NAME }} || true
# git checkout --orphan ${{ env.SCREENSHOTS_BRANCH_NAME }}
# git rm -rf .
# mkdir -p ./app/build/outputs/roborazzi
#
# - name: Download screenshots
# uses: actions/download-artifact@v4
# with:
# name: screenshots
# path: ./app/build/outputs/roborazzi/
#
# - name: Push screenshots to screenshots branch
# id: push-screenshot-diff
# run: |
# git add -A
# git config --global user.name ScreenshotBot
# git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
# git commit -m "Add screenshots"
# git push origin HEAD:${{ env.SCREENSHOTS_BRANCH_NAME }} -f
#
# - name: Checkout pr branch
# uses: actions/checkout@v4
# with:
# ref: ${{ github.event.workflow_run.head_branch }}

name: SaveScreenshot

on:
pull_request:
types:
- closed
paths-ignore:
- README.md

jobs:
save-screenshot:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
with:
api-key: ${{ secrets.API_KEY }}

- name: create screenshots
run: ./gradlew recordRoborazziProdDebug --stacktrace

- name: Upload screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./app/build/outputs/roborazzi/
retention-days: 1

- name: Save screenshots branch name
run: echo "SCREENSHOTS_BRANCH_NAME=screenshots_${{ github.base_ref }}" >> $GITHUB_ENV

- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main

- name: Checkout screenshots branch
run: |
git branch -D ${{ env.SCREENSHOTS_BRANCH_NAME }} || true
git checkout --orphan ${{ env.SCREENSHOTS_BRANCH_NAME }}
git rm -rf .
mkdir -p ./app/build/outputs/roborazzi
- name: Download screenshots
uses: actions/download-artifact@v4
with:
name: screenshots
path: ./app/build/outputs/roborazzi/

- name: Push screenshots to screenshots branch
id: push-screenshot-diff
run: |
git add -A
git config --global user.name ScreenshotBot
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
git commit -m "Add screenshots"
git push origin HEAD:${{ env.SCREENSHOTS_BRANCH_NAME }} -f
- name: Checkout pr branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
Loading

0 comments on commit d4e866a

Please sign in to comment.