9 Commits
v1 ... v1.0.2

Author SHA1 Message Date
93af96cd42 load dotenv 2022-12-08 17:24:06 +01:00
b38b874a2c cleanup 2022-12-08 16:00:30 +01:00
5c70f435c1 update deps and optimize dockerfile 2022-12-08 15:57:33 +01:00
1779f1b903 Update README.md 2021-10-27 13:49:59 +02:00
67d0f1dba0 Update README.md 2021-10-27 13:48:10 +02:00
60427a1726 updates 2021-10-27 13:44:44 +02:00
ad77892b7c Update README.md 2021-10-27 12:27:38 +02:00
6515c6f5a8 Merge pull request #2 from cupcakearmy/dependabot/pip/urllib3-1.26.3
Bump urllib3 from 1.26.2 to 1.26.3
2021-03-19 23:19:51 +01:00
dependabot[bot]
1cb3b489e6 Bump urllib3 from 1.26.2 to 1.26.3
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.2 to 1.26.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.2...1.26.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 20:10:02 +00:00
8 changed files with 127 additions and 123 deletions

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
*
!Pipfile*
!src

5
.gitignore vendored
View File

@@ -2,7 +2,8 @@
.venv .venv
# Dev # Dev
.env
.vscode .vscode
Test.md Test.md
.github/workflows .github/workflows/dev.yaml
*.secrets *.secrets

View File

@@ -1,13 +1,13 @@
FROM python:3.9-alpine FROM python:3.10-alpine
WORKDIR /tmp
RUN pip install pipenv
COPY ./Pipfile* ./
RUN pipenv install --system --deploy
WORKDIR /action WORKDIR /action
COPY ./Pipfile* ./
RUN pip install pipenv && \
pipenv install --system --deploy && \
pipenv --clear
COPY ./src . COPY ./src .
ENTRYPOINT [ "python" ] ENTRYPOINT [ "python" ]
CMD [ "/action/main.py" ] CMD [ "/action/main.py" ]

View File

@@ -7,10 +7,11 @@ name = "pypi"
requests = "*" requests = "*"
markdown = "*" markdown = "*"
py-gfm = "*" py-gfm = "*"
python-dotenv = "*"
[dev-packages] [dev-packages]
autopep8 = "*" autopep8 = "*"
mypy = "*" mypy = "*"
[requires] [requires]
python_version = "3.9" python_version = "3.10"

174
Pipfile.lock generated
View File

@@ -1,11 +1,11 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "88ca19a4a790aab7be54f3279f465695c5ab1d77b1bd3e9e6e0ae1b55952445e" "sha256": "d6b13a7d2799118601293cb0223043b384b6904d96f267f21ce4a596d59ac954"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
"python_version": "3.9" "python_version": "3.10"
}, },
"sources": [ "sources": [
{ {
@@ -18,86 +18,113 @@
"default": { "default": {
"certifi": { "certifi": {
"hashes": [ "hashes": [
"sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c", "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3",
"sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830" "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"
], ],
"version": "==2020.12.5" "markers": "python_full_version >= '3.6.0'",
"version": "==2022.12.7"
}, },
"chardet": { "charset-normalizer": {
"hashes": [ "hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
], ],
"version": "==3.0.4" "markers": "python_full_version >= '3.6.0'",
"version": "==2.1.1"
}, },
"idna": { "idna": {
"hashes": [ "hashes": [
"sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4",
"sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
], ],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "markers": "python_version >= '3.5'",
"version": "==2.10" "version": "==3.4"
}, },
"markdown": { "markdown": {
"hashes": [ "hashes": [
"sha256:5d9f2b5ca24bc4c7a390d22323ca4bad200368612b5aaa7796babf971d2b2f18", "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186",
"sha256:c109c15b7dc20a9ac454c9e6025927d44460b85bd039da028d85e2b6d0bcc328" "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff"
], ],
"index": "pypi", "index": "pypi",
"version": "==3.3.3" "version": "==3.4.1"
}, },
"py-gfm": { "py-gfm": {
"hashes": [ "hashes": [
"sha256:c4e873f310a84137acae5884a15e81a18eac17da9c00b20d5d9b82d37fd2d077", "sha256:8768b31bbfda8e1d52e2f32b363c138eedf52b1a81c06036b60ece576b2a652f",
"sha256:ef3a3e6e54817c21e97cc16c85789b0681e62958823a0ba3e3d29f8509d9dc49" "sha256:c49f43b584e15bdbe569141c92aefc00542289b6d88d95b38117e3359a35cdfe"
], ],
"index": "pypi", "index": "pypi",
"version": "==1.0.2" "version": "==2.0.0"
},
"python-dotenv": {
"hashes": [
"sha256:1684eb44636dd462b66c3ee016599815514527ad99965de77f43e0944634a7e5",
"sha256:b77d08274639e3d34145dfa6c7008e66df0f04b7be7a75fd0d5292c191d79045"
],
"index": "pypi",
"version": "==0.21.0"
}, },
"requests": { "requests": {
"hashes": [ "hashes": [
"sha256:7f1a0b932f4a60a1a65caa4263921bb7d9ee911957e0ae4a23a6dd08185ad5f8", "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983",
"sha256:e786fa28d8c9154e6a4de5d46a1d921b8749f8b74e28bde23768e5e16eece998" "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
], ],
"index": "pypi", "index": "pypi",
"version": "==2.25.0" "version": "==2.28.1"
}, },
"urllib3": { "urllib3": {
"hashes": [ "hashes": [
"sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08", "sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc",
"sha256:d8ff90d979214d7b4f8ce956e80f4028fc6860e4431f731ea4a8c08f23f99473" "sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"
], ],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
"version": "==1.26.2" "version": "==1.26.13"
} }
}, },
"develop": { "develop": {
"autopep8": { "autopep8": {
"hashes": [ "hashes": [
"sha256:d21d3901cb0da6ebd1e83fc9b0dfbde8b46afc2ede4fe32fbda0c7c6118ca094" "sha256:8b1659c7f003e693199f52caffdc06585bb0716900bbc6a7442fd931d658c077",
"sha256:ad924b42c2e27a1ac58e432166cc4588f5b80747de02d0d35b1ecbd3e7d57207"
], ],
"index": "pypi", "index": "pypi",
"version": "==1.5.4" "version": "==2.0.0"
}, },
"mypy": { "mypy": {
"hashes": [ "hashes": [
"sha256:0a0d102247c16ce93c97066443d11e2d36e6cc2a32d8ccc1f705268970479324", "sha256:0714258640194d75677e86c786e80ccf294972cc76885d3ebbb560f11db0003d",
"sha256:0d34d6b122597d48a36d6c59e35341f410d4abfa771d96d04ae2c468dd201abc", "sha256:0c8f3be99e8a8bd403caa8c03be619544bc2c77a7093685dcf308c6b109426c6",
"sha256:2170492030f6faa537647d29945786d297e4862765f0b4ac5930ff62e300d802", "sha256:0cca5adf694af539aeaa6ac633a7afe9bbd760df9d31be55ab780b77ab5ae8bf",
"sha256:2842d4fbd1b12ab422346376aad03ff5d0805b706102e475e962370f874a5122", "sha256:1c8cd4fb70e8584ca1ed5805cbc7c017a3d1a29fb450621089ffed3e99d1857f",
"sha256:2b21ba45ad9ef2e2eb88ce4aeadd0112d0f5026418324176fd494a6824b74975", "sha256:1f7d1a520373e2272b10796c3ff721ea1a0712288cafaa95931e66aa15798813",
"sha256:72060bf64f290fb629bd4a67c707a66fd88ca26e413a91384b18db3876e57ed7", "sha256:209ee89fbb0deed518605edddd234af80506aec932ad28d73c08f1400ef80a33",
"sha256:af4e9ff1834e565f1baa74ccf7ae2564ae38c8df2a85b057af1dbbc958eb6666", "sha256:26efb2fcc6b67e4d5a55561f39176821d2adf88f2745ddc72751b7890f3194ad",
"sha256:bd03b3cf666bff8d710d633d1c56ab7facbdc204d567715cb3b9f85c6e94f669", "sha256:37bd02ebf9d10e05b00d71302d2c2e6ca333e6c2a8584a98c00e038db8121f05",
"sha256:c614194e01c85bb2e551c421397e49afb2872c88b5830e3554f0519f9fb1c178", "sha256:3a700330b567114b673cf8ee7388e949f843b356a73b5ab22dd7cff4742a5297",
"sha256:cf4e7bf7f1214826cf7333627cb2547c0db7e3078723227820d0a2490f117a01", "sha256:3c0165ba8f354a6d9881809ef29f1a9318a236a6d81c690094c5df32107bde06",
"sha256:da56dedcd7cd502ccd3c5dddc656cb36113dd793ad466e894574125945653cea", "sha256:3d80e36b7d7a9259b740be6d8d906221789b0d836201af4234093cae89ced0cd",
"sha256:e86bdace26c5fe9cf8cb735e7cedfe7850ad92b327ac5d797c656717d2ca66de", "sha256:4175593dc25d9da12f7de8de873a33f9b2b8bdb4e827a7cae952e5b1a342e243",
"sha256:e97e9c13d67fbe524be17e4d8025d51a7dca38f90de2e462243ab8ed8a9178d1", "sha256:4307270436fd7694b41f913eb09210faff27ea4979ecbcd849e57d2da2f65305",
"sha256:eea260feb1830a627fb526d22fbb426b750d9f5a47b624e8d5e7e004359b219c" "sha256:5e80e758243b97b618cdf22004beb09e8a2de1af481382e4d84bc52152d1c476",
"sha256:641411733b127c3e0dab94c45af15fea99e4468f99ac88b39efb1ad677da5711",
"sha256:652b651d42f155033a1967739788c436491b577b6a44e4c39fb340d0ee7f0d70",
"sha256:6d7464bac72a85cb3491c7e92b5b62f3dcccb8af26826257760a552a5e244aa5",
"sha256:74e259b5c19f70d35fcc1ad3d56499065c601dfe94ff67ae48b85596b9ec1461",
"sha256:7d17e0a9707d0772f4a7b878f04b4fd11f6f5bcb9b3813975a9b13c9332153ab",
"sha256:901c2c269c616e6cb0998b33d4adbb4a6af0ac4ce5cd078afd7bc95830e62c1c",
"sha256:98e781cd35c0acf33eb0295e8b9c55cdbef64fcb35f6d3aa2186f289bed6e80d",
"sha256:a12c56bf73cdab116df96e4ff39610b92a348cc99a1307e1da3c3768bbb5b135",
"sha256:ac6e503823143464538efda0e8e356d871557ef60ccd38f8824a4257acc18d93",
"sha256:b8472f736a5bfb159a5e36740847808f6f5b659960115ff29c7cecec1741c648",
"sha256:b86ce2c1866a748c0f6faca5232059f881cda6dda2a893b9a8373353cfe3715a",
"sha256:bc9ec663ed6c8f15f4ae9d3c04c989b744436c16d26580eaa760ae9dd5d662eb",
"sha256:c9166b3f81a10cdf9b49f2d594b21b31adadb3d5e9db9b834866c3258b695be3",
"sha256:d13674f3fb73805ba0c45eb6c0c3053d218aa1f7abead6e446d474529aafc372",
"sha256:de32edc9b0a7e67c2775e574cb061a537660e51210fbf6006b0b36ea695ae9bb",
"sha256:e62ebaad93be3ad1a828a11e90f0e76f15449371ffeecca4a0a0b9adc99abcef"
], ],
"index": "pypi", "index": "pypi",
"version": "==0.790" "version": "==0.991"
}, },
"mypy-extensions": { "mypy-extensions": {
"hashes": [ "hashes": [
@@ -108,62 +135,27 @@
}, },
"pycodestyle": { "pycodestyle": {
"hashes": [ "hashes": [
"sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053",
"sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" "sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610"
], ],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "markers": "python_version >= '3.6'",
"version": "==2.6.0" "version": "==2.10.0"
}, },
"toml": { "tomli": {
"hashes": [ "hashes": [
"sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
"sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
], ],
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "markers": "python_version < '3.11'",
"version": "==0.10.2" "version": "==2.0.1"
},
"typed-ast": {
"hashes": [
"sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355",
"sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919",
"sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d",
"sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa",
"sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652",
"sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75",
"sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c",
"sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01",
"sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d",
"sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1",
"sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907",
"sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c",
"sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3",
"sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d",
"sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b",
"sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614",
"sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c",
"sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb",
"sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395",
"sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b",
"sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41",
"sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6",
"sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34",
"sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe",
"sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072",
"sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298",
"sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91",
"sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4",
"sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f",
"sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"
],
"version": "==1.4.1"
}, },
"typing-extensions": { "typing-extensions": {
"hashes": [ "hashes": [
"sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918", "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa",
"sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c", "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"
"sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"
], ],
"version": "==3.7.4.3" "markers": "python_version >= '3.7'",
"version": "==4.4.0"
} }
} }
} }

View File

@@ -14,7 +14,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: confluence-markdown-sync - uses: cupcakearmy/confluence-markdown-sync@v1
with: with:
from: './README.md' from: './README.md'
to: '123456' # The confluence page id where to write the output to: '123456' # The confluence page id where to write the output
@@ -27,8 +27,10 @@ jobs:
Uses basic auth for the rest api. Uses basic auth for the rest api.
- `cloud`: The ID can be found by looking at yout confluence domain: `https://xxx.atlassian.net/...` - `cloud`: The ID can be found by looking at your confluence domain: `https://<cloud>.atlassian.net/...`
- `user`: The user that generated the access token - `user`: The user that generated the access token
- `token`: You can generate the token [here](https://id.atlassian.com/manage-profile/security/api-tokens). Link to [Docs](https://confluence.atlassian.com/cloud/api-tokens-938839638.html) - `token`: You can generate the token [here](https://id.atlassian.com/manage-profile/security/api-tokens). Link to [Docs](https://confluence.atlassian.com/cloud/api-tokens-938839638.html)
- `to`: The page ID can be found by simply navigating to the page where you want the content to be postet to and looke at the url. It will look something like this: `https://<cloud-id>.atlassian.net/wiki/spaces/<space>/pages/<page-id>/<title>` - `to`: The page ID can be found by simply navigating to the page where you want the content to be postet to and looke at the url. It will look something like this: `https://<cloud-id>.atlassian.net/wiki/spaces/<space>/pages/<page-id>/<title>`
@@ -52,16 +54,16 @@ token: ${{ secrets.token }}
1. Clone the repo 1. Clone the repo
2. Install [act](https://github.com/nektos/act) 2. Install [act](https://github.com/nektos/act)
3. Create the same config in the repo folder as in the getting started section above. 3. Create the same config in the repo folder as in the getting started section above.
4. Change `uses: confluence-markdown-sync` -> `uses: ./` 4. Change `uses: cupcakearmy/confluence-markdown-sync` -> `uses: ./`
5. Create an example markdown file `Some.md` and set it in the config `from: './Some.md'` 5. Create an example markdown file `Some.md` and set it in the config `from: './Some.md'`
6. Run locally `act -b` 6. Run locally `act -b`
### With secrets ### With secrets
You can simply create a `.secrets` file and specify it to `act` You can simply create a `.secrets` file and specify it to `act`.
``` ```
token=abc123 TOKEN=abc123
``` ```
```yml ```yml

View File

@@ -1,25 +1,25 @@
# action.yml # action.yml
name: 'confluence-markdown-sync' name: confluence-markdown-sync
description: 'Copy content of a markdown file to a confluence site' description: Copy content of a markdown file to a confluence site
branding: branding:
icon: 'upload-cloud' icon: upload-cloud
color: 'blue' color: blue
inputs: inputs:
from: from:
description: 'Path to the markdown file. Relative to root of repository' description: Path to the markdown file. Relative to root of repository
required: true required: true
to: to:
description: 'The page ID in confluence' description: The page ID in confluence
required: true required: true
cloud: cloud:
description: 'Atlassian Cloud ID' description: Atlassian Cloud ID
required: true required: true
user: user:
description: 'Username of the token user' description: Username of the token user
required: true required: true
token: token:
description: 'Token for the user' description: Token for the user
required: true required: true
runs: runs:
using: 'docker' using: docker
image: 'Dockerfile' image: Dockerfile

View File

@@ -1,20 +1,25 @@
from typing import Dict, List from os import environ
from os import listdir, environ
from os.path import join from os.path import join
from typing import Dict
import requests import requests
from dotenv import load_dotenv
from markdown import markdown from markdown import markdown
from mdx_gfm import GithubFlavoredMarkdownExtension from mdx_gfm import GithubFlavoredMarkdownExtension
load_dotenv()
workspace = environ.get('GITHUB_WORKSPACE') workspace = environ.get('GITHUB_WORKSPACE')
if not workspace: if not workspace:
raise Exception('No workspace is set') print('No workspace is set')
exit(1)
envs: Dict[str, str] = {} envs: Dict[str, str] = {}
for key in ['from', 'to', 'cloud', 'user', 'token']: for key in ['from', 'to', 'cloud', 'user', 'token']:
value = environ.get(f'INPUT_{key.upper()}') value = environ.get(f'INPUT_{key.upper()}')
if not value: if not value:
raise Exception(f'Missing value for {key}') print(f'Missing value for {key}')
exit(1)
envs[key] = value envs[key] = value
with open(join(workspace, envs['from'])) as f: with open(join(workspace, envs['from'])) as f: