Browse Source

fix: pass secrets to reusable workflow

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2435/head
Pranav C 2 years ago
parent
commit
270903e7a6
  1. 9
      .github/workflows/release-executables.yml
  2. 2
      .github/workflows/release-nightly-dev.yml
  3. 2
      .github/workflows/release-pr.yml

9
.github/workflows/release-executables.yml

@ -13,13 +13,16 @@ on:
description: "Timely version" description: "Timely version"
required: true required: true
type: string type: string
secrets:
NC_GITHUB_TOKEN:
required: true
jobs: jobs:
build-executables: build-executables:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.NC_GITHUB_TOKEN }}
repository: 'nocodb/nocodb-timely' repository: 'nocodb/nocodb-timely'
- name: Cache node modules - name: Cache node modules
id: cache-npm id: cache-npm
@ -109,7 +112,7 @@ jobs:
- name: Upload executables(except mac executables) to release - name: Upload executables(except mac executables) to release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.NC_GITHUB_TOKEN }}
file: dist/** file: dist/**
tag: ${{ github.event.inputs.tag || inputs.tag }} tag: ${{ github.event.inputs.tag || inputs.tag }}
overwrite: true overwrite: true
@ -159,7 +162,7 @@ jobs:
- name: Upload mac executables to release - name: Upload mac executables to release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.NC_GITHUB_TOKEN }}
file: mac-dist/** file: mac-dist/**
tag: ${{ github.event.inputs.tag || inputs.tag }} tag: ${{ github.event.inputs.tag || inputs.tag }}
overwrite: true overwrite: true

2
.github/workflows/release-nightly-dev.yml

@ -54,6 +54,8 @@ jobs:
uses: ./.github/workflows/release-executables.yml uses: ./.github/workflows/release-executables.yml
with: with:
tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.nightly_build_tag }} tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.nightly_build_tag }}
secrets:
NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}"
# Build docker image and push to docker hub # Build docker image and push to docker hub
release-docker: release-docker:

2
.github/workflows/release-pr.yml

@ -83,6 +83,8 @@ jobs:
uses: ./.github/workflows/release-executables.yml uses: ./.github/workflows/release-executables.yml
with: with:
tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }} tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}
secrets:
NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}"
# leave-comment: # leave-comment:
# runs-on: 'ubuntu-latest' # runs-on: 'ubuntu-latest'

Loading…
Cancel
Save