mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Clean-up GitHub workflows (#14945)
* Clean-up GitHub workflows * Remove checkout step from 'prepare' action instead
This commit is contained in:
9
.github/actions/prepare/action.yml
vendored
9
.github/actions/prepare/action.yml
vendored
@@ -2,22 +2,19 @@ name: Prepare
|
||||
description: Install and build the app
|
||||
inputs:
|
||||
build:
|
||||
description: 'Build the production bundle of the platform'
|
||||
description: Build the production bundle of the platform
|
||||
required: false
|
||||
default: 'true'
|
||||
default: true
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- uses: pnpm/action-setup@v2.0.1
|
||||
- uses: pnpm/action-setup@v2.2.2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
|
||||
2
.github/workflows/blackbox-main.yml
vendored
2
.github/workflows/blackbox-main.yml
vendored
@@ -39,9 +39,7 @@ jobs:
|
||||
ORACLE_DL: oracle-instantclient-basic-21.4.0.0.0-1.el8.x86_64.rpm
|
||||
|
||||
- name: Start Databases
|
||||
shell: bash
|
||||
run: docker compose -f tests-blackbox/docker-compose.yml up -d --quiet-pull --wait
|
||||
|
||||
- name: Run Tests
|
||||
shell: bash
|
||||
run: pnpm run -w test:blackbox
|
||||
|
||||
1
.github/workflows/blackbox-pr.yml
vendored
1
.github/workflows/blackbox-pr.yml
vendored
@@ -29,5 +29,4 @@ jobs:
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
- name: Run Tests
|
||||
shell: bash
|
||||
run: TEST_DB=sqlite3 pnpm run -w test:blackbox
|
||||
|
||||
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
@@ -27,7 +27,6 @@ jobs:
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
- name: Run Linter
|
||||
shell: bash
|
||||
run: pnpm lint
|
||||
|
||||
unit:
|
||||
@@ -41,7 +40,6 @@ jobs:
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
- name: Run Tests
|
||||
shell: bash
|
||||
run: pnpm -r test
|
||||
|
||||
analyze:
|
||||
|
||||
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@@ -22,13 +22,13 @@ jobs:
|
||||
language:
|
||||
- javascript
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
uses: ./.github/actions/prepare
|
||||
with:
|
||||
build: 'false'
|
||||
build: false
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
|
||||
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
name: Build Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
node docker/pack
|
||||
|
||||
- name: Cache build artifacts
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/dist'
|
||||
key: build-artifacts-${{ github.sha }}
|
||||
@@ -59,10 +59,10 @@ jobs:
|
||||
if: ${{ github.repository_owner == 'directus' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/dist'
|
||||
key: build-artifacts-${{ github.sha }}
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- uses: pnpm/action-setup@v2.0.1
|
||||
- uses: pnpm/action-setup@v2.2.2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
@@ -95,22 +95,22 @@ jobs:
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/dist'
|
||||
key: build-artifacts-${{ github.sha }}
|
||||
|
||||
- name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
|
||||
- name: Extract metadata for Docker image
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ env.DOCKERHUB_IMAGE }}
|
||||
@@ -130,14 +130,14 @@ jobs:
|
||||
type=semver,pattern={{major}}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ env.DOCKERHUB_IMAGE }}
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ env.GHCR_IMAGE }}
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
|
||||
4
.github/workflows/sync-dockerhub-readme.yml
vendored
4
.github/workflows/sync-dockerhub-readme.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Sync Readme to Docker Hub
|
||||
uses: peter-evans/dockerhub-description@v2
|
||||
uses: peter-evans/dockerhub-description@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
Reference in New Issue
Block a user