Skip to content

Commit

Permalink
Speed up checkout of actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Dec 30, 2023
1 parent cfcbec0 commit 456f4f7
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 26 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,24 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 17
- name: Make gradlew executable
run: chmod +x gradlew
- name: Build
run: ./gradlew assembleDebug
- name: Run unit tests
run: ./gradlew testDebugUnitTest
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: set up JDK 17
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: 17

- name: Make gradlew executable
run: chmod +x gradlew

- name: Build
run: ./gradlew assembleDebug

- name: Run unit tests
run: ./gradlew testDebugUnitTest
2 changes: 1 addition & 1 deletion .github/workflows/contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/guide-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ jobs:
update_guides:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@ name: Nightly

on:
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Generate changelog
run: |
echo "## Changelog" >> $GITHUB_STEP_SUMMARY
sh ./scripts/list-nightly-commits.sh >> $GITHUB_STEP_SUMMARY
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
distribution: "adopt"
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build APK
run: |
echo ${NIGHTLY_STORE_FILE} | base64 -d > KEY_NIGHTLY.jks
Expand All @@ -34,10 +37,10 @@ jobs:
NIGHTLY_STORE_PASSWORD: ${{ secrets.NIGHTLY_STORE_PASSWORD }}
NIGHTLY_KEY_ALIAS: ${{ secrets.NIGHTLY_KEY_ALIAS }}
NIGHTLY_STORE_FILE: ${{ secrets.NIGHTLY_STORE_FILE }}

- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: Trail-Sense-Nightly.apk
path: ./app/build/outputs/apk/nightly/*.apk
retention-days: 7

6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
distribution: "adopt"
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build APK
run: |
echo ${DEV_STORE_FILE} | base64 -d > KEY_DEV.jks
Expand All @@ -28,6 +31,7 @@ jobs:
DEV_STORE_PASSWORD: ${{ secrets.DEV_STORE_PASSWORD }}
DEV_KEY_ALIAS: ${{ secrets.DEV_KEY_ALIAS }}
DEV_STORE_FILE: ${{ secrets.DEV_STORE_FILE }}

- name: Upload to release
uses: Shopify/[email protected]
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Website
on:
push:
branches:
- 'main'
- "main"
paths:
- 'site/**'
- "site/**"
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -27,14 +27,18 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'site'
path: "site"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 456f4f7

Please sign in to comment.