-
Notifications
You must be signed in to change notification settings - Fork 831
Add support for GPG #59
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
Closed
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
798fdae
Added support for GPG
jaredpetersen 9db208f
Small passphrase test data fix
jaredpetersen 23f6cd3
set private key to secret
jaredpetersen 14d3f1d
fixed generated settings
jaredpetersen 01f7e3b
changed gpg import to run in key directory
jaredpetersen e09c5c7
fixed configAuthentication invokation
jaredpetersen 1a5aa64
fixed a problem where key cleanup happened before import
jaredpetersen c6f4f07
remove test file
jaredpetersen 9098ec5
updated readme
jaredpetersen 1d7ec38
changed passhprase configuration to be more in line with docs
jaredpetersen 4eb5c87
fixed gpg private key description in action.yml
jaredpetersen 254f003
improved gpg test preciseness
jaredpetersen 1ecbe18
use runner temp for private key directory
jaredpetersen 5e3159d
created separate util module
jaredpetersen 8bc07f9
selective generation of settings for GPG + isolated gpg homedir
jaredpetersen 430dc5d
specified homedir in executable
jaredpetersen 6e0fcb3
fixed homedir path
jaredpetersen ebb46ea
forgot to build and lint
jaredpetersen 11c39b6
hopefully fixed util tests
jaredpetersen 1607b0d
trying to force gpg homedir to posix for windows to fix windows impor…
jaredpetersen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import path = require('path'); | ||
|
|
||
| const env = process.env; | ||
|
|
||
| describe('util tests', () => { | ||
| beforeEach(() => { | ||
| const tempEnv = Object.assign({}, env); | ||
| delete tempEnv.RUNNER_TEMP; | ||
| delete tempEnv.USERPROFILE; | ||
| process.env = tempEnv; | ||
| Object.defineProperty(process, 'platform', {value: 'linux'}); | ||
| }); | ||
|
|
||
| describe('getTempDir', () => { | ||
| it('gets temp dir using env', () => { | ||
| process.env['RUNNER_TEMP'] = 'defaulttmp'; | ||
| const util = require('../src/util'); | ||
|
|
||
| const tempDir = util.getTempDir(); | ||
|
|
||
| expect(tempDir).toEqual(process.env['RUNNER_TEMP']); | ||
| }); | ||
|
|
||
| it('gets temp dir for windows using userprofile', () => { | ||
| Object.defineProperty(process, 'platform', {value: 'win32'}); | ||
| process.env['USERPROFILE'] = 'winusertmp'; | ||
| const util = require('../src/util'); | ||
|
|
||
| const tempDir = util.getTempDir(); | ||
|
|
||
| expect(tempDir).toEqual( | ||
| path.join(process.env['USERPROFILE'], 'actions', 'temp') | ||
| ); | ||
| }); | ||
|
|
||
| it('gets temp dir for windows using c drive', () => { | ||
| Object.defineProperty(process, 'platform', {value: 'win32'}); | ||
| const util = require('../src/util'); | ||
|
|
||
| const tempDir = util.getTempDir(); | ||
|
|
||
| expect(tempDir).toEqual(path.join('C:\\', 'actions', 'temp')); | ||
| }); | ||
|
|
||
| it('gets temp dir for mac', () => { | ||
| Object.defineProperty(process, 'platform', {value: 'darwin'}); | ||
| const util = require('../src/util'); | ||
|
|
||
| const tempDir = util.getTempDir(); | ||
|
|
||
| expect(tempDir).toEqual(path.join('/Users', 'actions', 'temp')); | ||
| }); | ||
|
|
||
| it('gets temp dir for linux', () => { | ||
| const util = require('../src/util'); | ||
| const tempDir = util.getTempDir(); | ||
|
|
||
| expect(tempDir).toEqual(path.join('/home', 'actions', 'temp')); | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.