diff --git a/.github/workflows/codeq-analysisPR.yml b/.github/workflows/codeq-analysisPR.yml new file mode 100644 index 0000000..0a803fa --- /dev/null +++ b/.github/workflows/codeq-analysisPR.yml @@ -0,0 +1,35 @@ +name: 'CodeQL' + +on: pull_request + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20.11.1 + - name: Use node_modules cache + uses: actions/cache@v4 + with: + path: node_modules + key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }} + restore-keys: | + yarn-node-20-lock- + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript + - run: yarn add eas-cli + - run: yarn install --frozen-lockfile + - run: yarn build + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3746e15..7691a89 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,10 +1,6 @@ name: 'CodeQL' -on: - push: - branches: ['main', 'onboarding-screen'] - schedule: - - cron: '30 8 * * 5' +on: push jobs: analyze: diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml deleted file mode 100644 index 4613569..0000000 --- a/.github/workflows/label.yml +++ /dev/null @@ -1,22 +0,0 @@ -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler - -name: Labeler -on: [pull_request_target] - -jobs: - label: - - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - - steps: - - uses: actions/labeler@v4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml deleted file mode 100644 index 31cde8b..0000000 --- a/.github/workflows/preview.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: preview -on: pull_request - -jobs: - update: - name: EAS Update - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - name: Check for EXPO_TOKEN - run: | - if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then - echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions" - exit 1 - fi - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18.x - cache: yarn - - - name: Setup EAS - uses: expo/expo-github-action@v8 - with: - eas-version: latest - token: ${{ secrets.EXPO_TOKEN }} - - - name: Install dependencies - run: yarn install - - - name: Create preview - uses: expo/expo-github-action/preview@v8 - with: - command: eas update --auto diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 3e846fc..d401d8e 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -6,11 +6,7 @@ # https://github.com/github/super-linter name: Lint Code Base -on: - push: - branches: [ "main", "onboarding-screen" ] - pull_request: - branches: [ "main", "onboarding-screen" ] +on: push jobs: run-lint: runs-on: ubuntu-latest @@ -24,6 +20,6 @@ jobs: - name: Lint Code Base uses: github/super-linter@v4 env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: "main" + VALIDATE_ALL_CODEBASE: true + DEFAULT_BRANCH: 'main' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/super-linterPR.yml b/.github/workflows/super-linterPR.yml new file mode 100644 index 0000000..442e552 --- /dev/null +++ b/.github/workflows/super-linterPR.yml @@ -0,0 +1,25 @@ +# This workflow executes several linters on changed files based on languages used in your code base whenever +# you push a code or open a pull request. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/github/super-linter +name: Lint Code Base + +on: pull_request +jobs: + run-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: true + DEFAULT_BRANCH: 'main' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml deleted file mode 100644 index 98a1788..0000000 --- a/.github/workflows/update.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: update -on: push - -jobs: - update: - name: EAS update - runs-on: ubuntu-latest - steps: - - name: Check for EXPO_TOKEN - run: | - if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then - echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions" - exit 1 - fi - - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18.x - cache: yarn - - - name: Expo Github Actions - uses: expo/expo-github-action@8.2.1 - - with: - eas-version: latest - token: ${{ secrets.EXPO_TOKEN }} - - - name: Install Dependancies - run: yarn Install - - - name: Publish Update - run: eas update --auto