Skip to content

Commit 41873b0

Browse files
authored
Action path (#37)
* GPG Passphrase * GPG Passphrase * GPG Passphrase * GPG Passphrase
1 parent 602637b commit 41873b0

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/functional_tests.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ jobs:
2121
run: cp tests/README_TEMPLATE.md tests/README.md
2222
- name: Run our action
2323
uses: ./
24-
env:
25-
GPG_PASS: ${{ secrets.GPG_PASS }}
2624
with:
2725
python-version: "3.13"
2826
working-directory: tests/
27+
gpg-passphrase: ${{ secrets.GPG_PASS }}
2928
- name: Compare results
3029
shell: bash
3130
run: |
@@ -51,12 +50,11 @@ jobs:
5150
run: cp tests/README_TEMPLATE.md tests/README.md
5251
- name: Run our action
5352
uses: ./
54-
env:
55-
GPG_PASS: ${{ secrets.GPG_PASS }}
5653
with:
5754
python-version: "3.13"
5855
racket-version: "-1"
5956
rust-version: "-1"
6057
dotnet-version: "-1"
6158
ocaml-version: "-1"
6259
working-directory: tests/
60+
gpg-passphrase: ${{ secrets.GPG_PASS }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ You may want to commit and push the changes to your branch with:
3535
3636
If you'd like to opt out of having your code executed, add an `.optout` file to your directory for that day.
3737

38-
For each day, provide an input file named `input.gpg` and a solution file named `answers.gpg`. Set an environment variable called `GPG_PASS` with the encryption/decryption passphrase.
38+
For each day, provide an input file named `input.gpg` and a solution file named `answers.gpg`. Provide the encryption/decryption passphrase as the `gpg-passphrase` input.

action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ inputs:
2828
description: "The working directory. Default is the root of the repository."
2929
required: false
3030
default: "."
31+
gpg-passphrase:
32+
description: "The passphrase for the GPG-encrypted files."
33+
required: true
3134
runs:
3235
using: "composite"
3336
steps:
@@ -60,9 +63,11 @@ runs:
6063
- name: Install package
6164
run: echo $GITHUB_ACTION_PATH && pip install $GITHUB_ACTION_PATH
6265
shell: bash
63-
- name: Change directory
66+
- name: Run our Python module
6467
run: |
6568
pushd ${{ inputs.working-directory }}
6669
eval $(opam env)
70+
echo "::add-mask::${{ inputs.gpg-passphrase }}"
71+
export GPG_PASS="${{ inputs.gpg-passphrase }}"
6772
python -m advent_of_action.main
6873
shell: bash

0 commit comments

Comments
 (0)