Skip to content

Commit c82bf79

Browse files
committed
More debugging
1 parent d8e285d commit c82bf79

5 files changed

Lines changed: 25 additions & 904 deletions

File tree

.github/workflows/download.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ jobs:
5959
name: Verify non-empty file was downloaded
6060
run: echo "nonEmpty=$(test -s index.html)" >> "$GITHUB_OUTPUT"
6161

62-
- name: Validate job outputs store properly
63-
run: echo "Job output value is ${{steps.verification.outputs.file.nonEmpty}} && true && echo "true"|| echo "false" "
62+
- name: Validate job outputs stored properly
63+
run: |
64+
output=${{steps.verification.outputs.file.nonEmpty}}
65+
if [["${output}"]]; then
66+
echo "Job output is true. File is not empty."
67+
else
68+
echo "Job output is false. File is empty."
69+
fi
70+
6471
6572
- name: Cache the file - to be used in deployment workflow
6673
uses: actions/upload-artifact@v4

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ Project utilizing various DevOps tech stacks for web hosting.
77
- Google Cloud permissioning for direct access to a single Google Drive file is not so straightforward
88
- On Github, secrets stored under Secrets and Variables -> Actions can be accessed by anyone with collaborator access. Secrets and Variables -> Codespaces are encrypted, not passed to forks and are not accessible by all collaborators.
99
- Github Codespaces secrets are NOT accessible in Github Actions Workflows.
10+
- [Reusable Workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows#creating-a-reusable-workflow) as well as more info on [Reusing Workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows)
11+
- [Job Outputs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs)
12+
Note - most common way to store variables in Github involves using and echo statemnt where a value is stored in variable and then piping the result of that statement into the `$GITHB_OUTPUT` environment variable, ex:
13+
```
14+
echo "MY_VAR=value" >> $GITHUB_OUTPUT
15+
```
16+
- Workflow Call and Workflow Dispatch events can be triggered on any branch, HOWEVER Workflow Run will ONLY trigger on the main branch [Github Documentation on Workflow Events]
17+
(https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_call)
18+
- BEWARE of the ":" character when doing command-line substitutions
19+
- Composite actions allow for chaining simple job steps commands together to be executed in a single, reusable step (See [Composite Action](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action))
20+
- Nested expressions are NOT supported by Github actions and instead requires the use of the `format` function. For more information on evaluating expresssions in workflows and actions, see [here](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#format)
1021

1122

1223
# references
@@ -25,5 +36,6 @@ In order to test locally, `tflocal` was used in conjunction with localstack to e
2536
* [ ] add deployment configuration for ansible
2637
* [X] add github actions CI/CD
2738
* [ ] add AWS CodePipline CI/CD
28-
* ~~[ ] add localstack testing to CI/CD pipeline to verify html page works~~ (using Google Drive direct download to HTML file)
29-
* [ ] create repository(s) to build Docker images used for downloading the Google Drive file and another image for deploying resources (justification - potential setup/ startup efficiency gain on CI/CD environment initiation)
39+
* [x] ~~~add localstack testing to CI/CD pipeline to verify html page works~~ (using Google Drive direct download to HTML file)
40+
* [ ] create repository(s) to build Docker images used for downloading the Google Drive file and another image for deploying resources (justification - potential setup/ startup efficiency gain on CI/CD environment initiation)
41+
* [ ] Refactor the [download.yaml](.github/workflows/download.yaml) and [deploy.yaml](.github/workflows/deploy.yaml) so that the deploy workflow calls the download workflow instead. (Triggering things from the download workflow initially allowed for easier testing.)

0 commit comments

Comments
 (0)