Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables defined in the container are not evaluatable #757

Closed
mulle-nat opened this issue Jul 20, 2021 · 2 comments · Fixed by #771 or #828
Closed

Environment variables defined in the container are not evaluatable #757

mulle-nat opened this issue Jul 20, 2021 · 2 comments · Fixed by #771 or #828
Assignees
Labels
area/image Relating to issues in the Docker image area/runner Relating to errors in the runner kind/bug Something isn't working meta/resolved Issue has been fixed or valid solution has been provided (not workaround)

Comments

@mulle-nat
Copy link

mulle-nat commented Jul 20, 2021

System information

  • Operating System: macOS

  • Architecture: x86_64

  • Docker version: Docker version 20.10.7, build f0df350

  • Docker image used in act: catthehacker/ubuntu:act-20.04

  • act version: 0.2.23

Expected behaviour

I expected to be able to use container defined environment variables in if: statements.

name: CI

on: [push]

env:
# ENV2: # undefined here, but defined in local container 

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-latest] # macos-latest,

    steps:
    - name: Dump Environment
      run:  env | sort

    - name: Test
      if: ${{ env.ENV2 }} 
      run:  echo Test

Actual behaviour

ENV2 value is ignored, unless defined in workflow file.

Workflow and/or repository

See the complete workflow with step by step instructions on how to reproduce:

https://github.com/mulle-nat/act-and-github

@mulle-nat mulle-nat added the kind/bug Something isn't working label Jul 20, 2021
@catthehacker
Copy link
Member

We don't inspect Docker image for envvars, they should be in /etc/environment

@catthehacker catthehacker self-assigned this Aug 9, 2021
@catthehacker catthehacker added area/image Relating to issues in the Docker image area/runner Relating to errors in the runner labels Aug 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2021

Issue is stale and will be closed in 14 days unless there is new activity

@github-actions github-actions bot added the stale label Sep 9, 2021
@catthehacker catthehacker added stale-exempt Exempt from stale and removed stale labels Sep 23, 2021
@catthehacker catthehacker reopened this Sep 23, 2021
@mergify mergify bot closed this as completed in #771 Sep 26, 2021
@catthehacker catthehacker added meta/resolved Issue has been fixed or valid solution has been provided (not workaround) and removed stale-exempt Exempt from stale labels Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/image Relating to issues in the Docker image area/runner Relating to errors in the runner kind/bug Something isn't working meta/resolved Issue has been fixed or valid solution has been provided (not workaround)
Projects
None yet
2 participants