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

Can't set build_arg from env #65

Closed
dfreilich opened this issue Jun 23, 2020 · 1 comment
Closed

Can't set build_arg from env #65

dfreilich opened this issue Jun 23, 2020 · 1 comment

Comments

@dfreilich
Copy link

I've tried to set a build_arg from an env I set earlier with Github Actions, but I seem to be unable to. Am I doing something wrong, or is there a real issue here?

jobs:
  deliver-docker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Determine version
        id: version
        run: echo "::set-env name=PACK_VERSION::`echo ${{ github.event.release.tag_name }} | cut -d "v" -f2`"
        shell: bash
      - name: Build and Push Image
        uses: docker/build-push-action@v1
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}
          repository: dfreilich/pack
          tags: latest
          dockerfile: .github/workflows/delivery/docker/Dockerfile
          build_args: PACK_VERSION=`${{ env.PACK_VERSION }}
@dfreilich
Copy link
Author

What I found was that I wasn't able to use env vars in my inputs. Instead, this said to use set-outputs and access it using ${{ steps..outputs. }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant