Skip to content

Commit 5306fae

Browse files
committed
Add GitHub action to test docker image creation
1 parent 76605a3 commit 5306fae

File tree

8 files changed

+27
-10
lines changed

8 files changed

+27
-10
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build Docker Image
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-image:
7+
name: Build Image
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Build Docker Image
14+
uses: docker/build-push-action@v2
15+
with:
16+
context: .
17+
push: false

.github/workflows/check-python-formatting.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jobs:
77
name: runner / black
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
11+
1112
- name: Check files using the black formatter
1213
uses: rickstaa/action-black@v1

.github/workflows/publish-docker-image.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717

1818
- name: Login to DockerHub
1919
uses: docker/login-action@v1
@@ -25,15 +25,14 @@ jobs:
2525
id: meta
2626
uses: docker/metadata-action@v3
2727
with:
28-
images: |
29-
nevermendel/leetcode-export
28+
images: nevermendel/leetcode-export
3029
tags: |
3130
type=ref,event=branch
3231
type=ref,event=pr
3332
type=semver,pattern={{version}}
3433
type=semver,pattern={{major}}.{{minor}}
3534
36-
- name: Build and push Docker images
35+
- name: Build and push Docker image
3736
uses: docker/build-push-action@v2
3837
with:
3938
context: .

.github/workflows/publish-python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515

1616
- name: Set tag version
1717
id: tag_version

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Using the interactive menu is preferred because it will avoid storing cookies in
106106
The script accepts the following arguments:
107107
108108
```
109-
usage: leetcode_export [-h] [--cookies COOKIES] [--folder FOLDER]
109+
usage: leetcode-export [-h] [--cookies COOKIES] [--folder FOLDER]
110110
[--problem-folder-name PROBLEM_FOLDER_NAME]
111111
[--problem-statement-filename PROBLEM_STATEMENT_FILENAME]
112112
[--problem-statement-content PROBLEM_STATEMENT_CONTENT]

leetcode_export/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def parse_args():
1818
parser = argparse.ArgumentParser(
1919
description="Export LeetCode submissions",
2020
formatter_class=lambda prog: argparse.RawTextHelpFormatter(
21-
"leetcode_export", width=80
21+
"leetcode-export", width=80
2222
),
2323
)
2424

leetcode_export/leetcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def set_cookies(self, cookies: str) -> bool:
8686
)
8787
return False
8888

89-
for (cookie_key, cookie_value) in cookie_dict.items():
89+
for cookie_key, cookie_value in cookie_dict.items():
9090
self.session.cookies.set(cookie_key, cookie_value)
9191
if self.is_user_logged():
9292
logging.info("Cookie set successful")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
description="Python script to export your LeetCode solutions",
1616
long_description=long_description,
1717
long_description_content_type="text/markdown",
18-
keywords=["leetcode", "leetcode-solutios", "leetcode-export"],
18+
keywords=["leetcode", "leetcode-solutions", "leetcode-export"],
1919
classifiers=[
2020
"Programming Language :: Python :: 3",
2121
"Programming Language :: Python :: 3.8",

0 commit comments

Comments
 (0)