Skip to content

Commit

Permalink
Merge branch 'main' into renovate/gradle-8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom authored Aug 14, 2023
2 parents bde6680 + 686ea8b commit fc8c372
Show file tree
Hide file tree
Showing 437 changed files with 10,280 additions and 998 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request_ideas_for_improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Feature request, Ideas for Improvement
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Idea Description**

**Reference images and links**
19 changes: 19 additions & 0 deletions .github/workflows/ActionLint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
paths:
- '.github/workflows/**'

name: "Trigger: Push action"
permissions: {}

jobs:
actionlint:
name: Actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.25
./actionlint -color
shell: bash
3 changes: 2 additions & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
contents: read

runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 40

steps:
- name: Checkout
Expand All @@ -35,6 +35,7 @@ jobs:
with:
name: build-outputs
path: app-android/build/outputs
retention-days: 14

# androidTest:
# needs: build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CompareScreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: compare screenshot test
id: compare-screenshot-test
run: |
./gradlew compareRoborazziDebug --stacktrace --rerun-tasks -Proborazzi.test.compare=true -Proborazzi.test.record=false -Pscreenshot
./gradlew compareRoborazziDebug compareRoborazziDevDebug --stacktrace -Pscreenshot
- uses: actions/upload-artifact@v3
if: ${{ always() }}
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: pr
path: pr/
55 changes: 0 additions & 55 deletions .github/workflows/DependencyDiff.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/DropStaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: drop-staging

on:
pull_request:
types: [closed]

# Disable all permissions. We have to enable required permissions at job-level.
permissions: {}

jobs:
drop-stage:
name: "Drop from staging"

runs-on: ubuntu-latest

permissions:
contents: read # for checkout

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
repository: droidkaigi/conference-app-2023
ref: gh-actions
path: gh-actions
- uses: ./gh-actions/actions/destroy-distribution-by-name
with:
api-token: ${{ secrets.DEPLOYGATE_API_TOKEN }}
app-owner-name: droidkaigi
platform: android
app-id: io.github.droidkaigi.confsched2023.dev
distribution-name: ${{ format('debug/refs/pull/{0}/head', github.event.pull_request.number) }}
2 changes: 1 addition & 1 deletion .github/workflows/Format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
permissions:
contents: read

timeout-minutes: 6
timeout-minutes: 20

runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Self-hosted Renovate
uses: renovatebot/github-action@0868f611868abf92ddbb6f2c01d2b6c2d818ec38 # v38.1.7
uses: renovatebot/github-action@23a02fe7be9e93f857a953cc8162e57d2c8401ef # v39.0.1
with:
configurationFile: renovate.json5
token: ${{ secrets.RENOVATE_TEST_TOKEN }} # workflow, repo, read user:email permissions
Expand Down
126 changes: 126 additions & 0 deletions .github/workflows/StagePullRequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: stage-app-pull-request

on:
workflow_run:
workflows:
- Build
types:
- completed

# Disable all permissions. We have to enable required permissions at job-level.
permissions: {}

jobs:
stage-epic:
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
permissions:
actions: read # for listJobsForWorkflowRun and listWorkflowRunArtifacts
contents: read # for checkout
deployments: write # for create-deployment
pull-requests: read # for listing pull requests

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
repository: droidkaigi/conference-app-2023
ref: gh-actions
path: gh-actions
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
id: get-pr
with:
script: |
const headBranch = '${{ format('{0}:{1}', github.event.workflow_run.head_repository.owner.login, github.event.workflow_run.head_branch) }}'
const { data: pulls } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: headBranch,
direction: 'desc',
sort: 'updated',
per_page: 1
})
if (pulls.length === 0) {
return '[halt]'
} else {
return pulls[0]
}
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
id: get-artifact-id
if: steps.get-pr.outputs.result != '[halt]'
with:
result-encoding: string
script: |
const { data: resp } = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }}
})
const artifact = resp.artifacts.find((a) => a.name === "build-outputs")
if (artifact) {
return artifact.id
} else {
return '[halt]'
}
- uses: ./gh-actions/actions/get-artifact
id: get-artifact
if: steps.get-artifact-id.outputs.result != '[halt]'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
artifact-id: ${{ steps.get-artifact-id.outputs.result }}
path: ~/build-outputs
- run: >
unzip ${{ steps.get-artifact.outputs.archive-path }} -d ~/build-outputs &&
rm -f ${{ steps.get-artifact.outputs.archive-path }}
- uses: ./gh-actions/actions/find-files
id: find-dev-debug-apk
with:
pattern: "~/build-outputs/**/app-android-dev-debug.apk"
- uses: ./gh-actions/actions/create-deployment
id: create-deployment
with:
github-token: ${{ github.token }}
ref: refs/pull/${{ fromJSON(steps.get-pr.outputs.result).number }}/head
sha: ${{ fromJSON(steps.get-pr.outputs.result).head.sha }}
artifact-name: build-outputs
environment: deploygate-distribution
- uses: tomoya0x00/dg-upload-app-action@eb9f76ba60198daa17c583705ebf527216e2def7
id: upload
continue-on-error: true
with:
app_owner_name: droidkaigi
api_token: ${{ secrets.DEPLOYGATE_API_TOKEN }}
app_file_path: ${{ fromJSON(steps.find-dev-debug-apk.outputs.paths)[0] }}
message: GitHub Actions have staged an artifact of ${{ fromJSON(steps.get-pr.outputs.result).number }}/head / ${{ fromJSON(steps.get-pr.outputs.result).head.sha }}
distribution_find_by: name
distribution_id: ${{ format('debug/refs/pull/{0}/head', fromJSON(steps.get-pr.outputs.result).number) }}
release_note: ${{ format('Workflow {0}/{1} based on {2}', github.run_id , github.run_number , fromJSON(steps.get-pr.outputs.result).head.sha) }}
pin: false
- name: generate properties based on upload step's status
id: deployment-properties
if: steps.upload.conclusion == 'success'
run: |
if [[ "${{ steps.upload.outcome }}" == "success" ]]; then
echo "deployment-url=${{ steps.upload.outputs.distribution_url }}" >> "$GITHUB_OUTPUT"
echo "description=Deployed an app successfully. Please try it through DeployGate!" >> "$GITHUB_OUTPUT"
else
echo "deployment-url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT"
echo "description=Staging an app failed. Please check the workflow." >> "$GITHUB_OUTPUT"
fi
- uses: ./gh-actions/actions/commit-deployment
if: steps.upload.conclusion == 'success'
with:
github-token: ${{ github.token }}
deployment-id: ${{ fromJSON(steps.create-deployment.outputs.deployment).id }}
state: ${{ steps.upload.outcome }}
deployment-url: ${{ steps.deployment-properties.outputs.deployment-url }}
description: ${{ steps.deployment-properties.outputs.description }}
Loading

0 comments on commit fc8c372

Please sign in to comment.