Skip to content

Commit

Permalink
use env
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvapiav committed Mar 21, 2024
1 parent e420914 commit 85c40b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/actions/build-n-upload-action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ FROM ubuntu:22.04

ENV TZ=Europe/Helsinki

# Set environment variables
ENV cachix_toke=${cachix_token2} \
github_token=${github_token}

RUN apt-get update && apt-get -y install curl xz-utils git

# Install nixos
Expand All @@ -12,11 +16,14 @@ RUN /install_nix.sh
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

RUN --mount=type=secret,id=github_token \
cat /run/secrets/github_token
#RUN --mount=type=secret,id=github_token \
# cat /run/secrets/github_token

#RUN --mount=type=secret,id=cachix_token2 \
# cat /run/secrets/cachix_token2

RUN --mount=type=secret,id=cachix_token2 \
cat /run/secrets/cachix_token2
RUN echo "cachix_token: $cachix_token"
RUN echo "github token: $github_token"

# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
secrets: |
"cachix_token2 = here token example"
"github_token=${{ secrets.GITHUB_TOKEN }}"
env:
cachix_token2: "Secret cachix token"
github_token: ${{ secrets.GITHUB_TOKEN }}
# Use the output from the `hello` step
- name: Upload Build Artifacts
run: |
Expand Down

0 comments on commit 85c40b2

Please sign in to comment.