masteriin vietäväksi
This commit is contained in:
@@ -7,14 +7,14 @@ on:
|
||||
jobs:
|
||||
feature:
|
||||
if: github.ref != 'refs/heads/main'
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@v1
|
||||
secrets: inherit
|
||||
with:
|
||||
bats-image: bats/bats:latest
|
||||
|
||||
main:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@v1
|
||||
secrets: inherit
|
||||
with:
|
||||
bats-image: bats/bats:latest
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
name: POC — env scope across containers
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
||||
|
||||
env:
|
||||
PIPELINE_VAR: hello-from-workflow-level
|
||||
|
||||
jobs:
|
||||
test-env-scope:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
JOB_VAR: hello-from-job-level
|
||||
steps:
|
||||
- name: Step 1 — native shell
|
||||
run: |
|
||||
echo "PIPELINE_VAR=${PIPELINE_VAR}"
|
||||
echo "JOB_VAR=${JOB_VAR}"
|
||||
echo "PIPELINE_VAR=${PIPELINE_VAR}" >> "${GITHUB_ENV}"
|
||||
echo "JOB_VAR=${JOB_VAR}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Step 2 — docker run alpine, no -e flag
|
||||
run: |
|
||||
echo "--- Without -e ---"
|
||||
docker run --rm alpine:latest sh -c '
|
||||
echo "PIPELINE_VAR=${PIPELINE_VAR:-EMPTY}"
|
||||
echo "JOB_VAR=${JOB_VAR:-EMPTY}"
|
||||
'
|
||||
|
||||
- name: Step 3 — docker run alpine, with -e flag
|
||||
run: |
|
||||
echo "--- With -e ---"
|
||||
docker run --rm -e PIPELINE_VAR -e JOB_VAR alpine:latest sh -c '
|
||||
echo "PIPELINE_VAR=${PIPELINE_VAR:-EMPTY}"
|
||||
echo "JOB_VAR=${JOB_VAR:-EMPTY}"
|
||||
'
|
||||
|
||||
- name: Step 4 — docker run, vars from GITHUB_ENV
|
||||
run: |
|
||||
echo "--- From GITHUB_ENV ---"
|
||||
docker run --rm -e PIPELINE_VAR -e JOB_VAR alpine:latest sh -c '
|
||||
echo "PIPELINE_VAR=${PIPELINE_VAR:-EMPTY}"
|
||||
echo "JOB_VAR=${JOB_VAR:-EMPTY}"
|
||||
'
|
||||
Reference in New Issue
Block a user