mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
fix: remove the usage of secret in workflows (#192)
This commit is contained in:
7 files changed
+8
-22
No files matched your search
@@ -18,9 +18,9 @@ on:
|
|||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
DOCKERHUB_USERNAME:
|
DOCKERHUB_USERNAME:
|
||||||
required: true
|
required: false
|
||||||
DOCKERHUB_TOKEN:
|
DOCKERHUB_TOKEN:
|
||||||
required: true
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
@@ -42,6 +42,7 @@ jobs:
|
|||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
|
if: always()
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
@@ -53,5 +54,5 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ${{ inputs.dockerfilePath }}
|
file: ${{ inputs.dockerfilePath }}
|
||||||
target: ${{ inputs.target }}
|
target: ${{ inputs.target }}
|
||||||
push: true
|
push: ${{ secrets.DOCKERHUB_USERNAME != '' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
@@ -2,15 +2,6 @@ name: CI Checks
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
secrets:
|
|
||||||
GOOGLE_CLIENT_ID:
|
|
||||||
required: true
|
|
||||||
GOOGLE_CLIENT_SECRET:
|
|
||||||
required: true
|
|
||||||
GH_CLIENT_ID:
|
|
||||||
required: true
|
|
||||||
GH_CLIENT_SECRET:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
ci-checks:
|
ci-checks:
|
||||||
uses: ./.github/workflows/ci-checks.yml
|
uses: ./.github/workflows/ci-checks.yml
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: ci-checks
|
needs: ci-checks
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
ci-checks:
|
ci-checks:
|
||||||
uses: ./.github/workflows/ci-checks.yml
|
uses: ./.github/workflows/ci-checks.yml
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
ci-checks:
|
ci-checks:
|
||||||
uses: ./.github/workflows/ci-checks.yml
|
uses: ./.github/workflows/ci-checks.yml
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: ci-checks
|
needs: ci-checks
|
||||||
|
|||||||
@@ -121,12 +121,6 @@ You can edit the files on your host, and the changes will be reflected in the co
|
|||||||
|
|
||||||
Copy `.env.sample` to `.env` and customize it for your needs.
|
Copy `.env.sample` to `.env` and customize it for your needs.
|
||||||
|
|
||||||
Build the whole project for the first time:
|
|
||||||
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
This will build the typescript for each package and the server.
|
|
||||||
|
|
||||||
Run dev server (frontend, backend):
|
Run dev server (frontend, backend):
|
||||||
|
|
||||||
yarn dev
|
yarn dev
|
||||||
@@ -191,3 +185,7 @@ You can copy from `.env.sample`
|
|||||||
**YOU MUST CHANGE THE SECRET_KEY** in `.env` file.
|
**YOU MUST CHANGE THE SECRET_KEY** in `.env` file.
|
||||||
|
|
||||||
SECRET_KEY=your-secret-key
|
SECRET_KEY=your-secret-key
|
||||||
|
|
||||||
|
You can generate a random key by running
|
||||||
|
|
||||||
|
yarn setup
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
"build": "yarn workspace server build && yarn workspace app build && yarn workspace analytics build",
|
"build": "yarn workspace server build && yarn workspace app build && yarn workspace analytics build",
|
||||||
"dev": "concurrently -n \"App,Server\" -c \"bgBlue.bold,bgGreen.bold\" \"yarn workspace app dev\" \"yarn workspace server dev\"",
|
"dev": "concurrently -n \"App,Server\" -c \"bgBlue.bold,bgGreen.bold\" \"yarn workspace app dev\" \"yarn workspace server dev\"",
|
||||||
"server": "yarn workspace server dev",
|
"server": "yarn workspace server dev",
|
||||||
"cli": "yarn workspace client start",
|
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"format": "prettier --ignore-path .prettierignore --write app server",
|
"format": "prettier --ignore-path .prettierignore --write app server",
|
||||||
"test": "yarn node --experimental-vm-modules --no-warnings $(yarn bin jest)",
|
"test": "yarn node --experimental-vm-modules --no-warnings $(yarn bin jest)",
|
||||||
|
|||||||
Reference in new issue
Block a user