Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build CardAction

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: [x64, arm64]
config: [release]

steps:
- uses: actions/checkout@v4

- name: Setup Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}

- name: Build CardAction
run: |
.\build.bat ${{ matrix.arch }} ${{ matrix.config }}

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: CardAction-${{ matrix.arch }}-${{ matrix.config }}
path: build/${{ matrix.arch }}/${{ matrix.config }}/CardAction.exe
42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "CodeQL Analysis"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * 0' # Run once a week on Sunday

jobs:
analyze:
name: Analyze
runs-on: windows-latest
permissions:
security-events: write
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Setup Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1

- name: Build
run: |
.\build.bat x64 release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CardAction

![Build Status](https://github.com/username/cardaction/actions/workflows/build.yml/badge.svg)

This Windows application triggers events when a smart card is removed or inserted. You define the actions in a CardAction.ini file that looks like this:

```ini
Expand All @@ -11,4 +13,4 @@ Command=cmd.exe /c echo Card inserted {2} > %TEMP%\card_inserted.txt
Command=cmd.exe /c echo Card removed > %TEMP%\card_removed.txt
```

The above example will trigger the command when a card is inserted or removed. The command can be any executable, and you can also send APDU commands to be sent when the card is inserted. The responses from the APDUs can be used in the command using placeholders. In the example above `{2}` will be replaced with the response from the second APDU command.
The above example will trigger the command when a card is inserted or removed. The command can be any executable, and you can also send APDU commands to be sent when the card is inserted. The responses from the APDUs can be used in the command using placeholders. In the example above `{2}` will be replaced with the response from the second APDU command.
Loading