Skip to content

Copy env files from host where actions runner is located #26623

Answered by SibLiant
SibLiant asked this question in Actions
Discussion options

You must be logged in to vote

ok… this was just understanding how to organize my actions / jobs / steps better.

Working example:

name: Node.js CI

on:
workflow_dispatch:
push:
branches: [ master ]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
copy_env_files:
runs-on: self-hosted
needs: build
if: success()
steps:
- run: cp ~/server_js/vd_be_env_files/root_env ./.env

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant