diff --git a/.devbox/virtenv/bin/initHook.sh b/.devbox/virtenv/bin/initHook.sh new file mode 120000 index 00000000..5920ff1d --- /dev/null +++ b/.devbox/virtenv/bin/initHook.sh @@ -0,0 +1 @@ +/home/sunandasamadd/devops-directive-github-actions-course/.devbox/virtenv/poetry/bin/initHook.sh \ No newline at end of file diff --git a/.devbox/virtenv/bin/venvShellHook.sh b/.devbox/virtenv/bin/venvShellHook.sh new file mode 120000 index 00000000..42cd1d8d --- /dev/null +++ b/.devbox/virtenv/bin/venvShellHook.sh @@ -0,0 +1 @@ +/home/sunandasamadd/devops-directive-github-actions-course/.devbox/virtenv/python312/bin/venvShellHook.sh \ No newline at end of file diff --git a/.devbox/virtenv/poetry/bin/initHook.sh b/.devbox/virtenv/poetry/bin/initHook.sh new file mode 100755 index 00000000..e4a5a0ea --- /dev/null +++ b/.devbox/virtenv/poetry/bin/initHook.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +poetry env use $(command -v python) --directory="${DEVBOX_PYPROJECT_DIR:-$DEVBOX_DEFAULT_PYPROJECT_DIR}" --no-interaction --quiet >&2 diff --git a/.devbox/virtenv/python312/bin/venvShellHook.sh b/.devbox/virtenv/python312/bin/venvShellHook.sh new file mode 100755 index 00000000..84c5ab10 --- /dev/null +++ b/.devbox/virtenv/python312/bin/venvShellHook.sh @@ -0,0 +1,55 @@ +#!/bin/sh +set -eu +STATE_FILE="$DEVBOX_PROJECT_ROOT/.devbox/venv_check_completed" + +is_valid_venv() { + [ -f "$1/bin/activate" ] && [ -f "$1/bin/python" ] +} + +is_devbox_venv() { + [ "$1/bin/python" -ef "$DEVBOX_PACKAGES_DIR/bin/python" ] +} + +create_venv() { + python -m venv "$VENV_DIR" --clear + echo "*\n.*" >> "$VENV_DIR/.gitignore" +} + +# Check that Python version supports venv +if ! python -c 'import venv' 1> /dev/null 2> /dev/null; then + echo "WARNING: Python version must be > 3.3 to create a virtual environment." + touch "$STATE_FILE" + exit 1 +fi + +# Check if the directory exists +if [ -d "$VENV_DIR" ]; then + if is_valid_venv "$VENV_DIR"; then + # Check if we've already run this script + if [ -f "$STATE_FILE" ]; then + # "We've already run this script. Exiting..." + exit 0 + fi + if ! is_devbox_venv "$VENV_DIR"; then + echo "WARNING: Virtual environment at $VENV_DIR doesn't use Devbox Python." + echo "Do you want to overwrite it? (y/n)" + read reply + echo + case "$reply" in + [Yy]) echo "Overwriting existing virtual environment..." + create_venv ;; + [Nn]) echo "Using your existing virtual environment. We recommend changing \$VENV_DIR to a different location" + touch "$STATE_FILE" + exit 0 ;; + *) echo "Invalid input. Exiting..." + exit 1 ;; + esac + fi + else + echo "Directory exists but is not a valid virtual environment. Creating a new one..." + create_venv + fi +else + echo "Virtual environment directory doesn't exist. Creating new one..." + create_venv +fi diff --git a/.github/workflows/03-core-features--04-triggers-and-filters.yaml b/.github/workflows/03-core-features--04-triggers-and-filters.yaml index d5d72d3b..3b0edec3 100644 --- a/.github/workflows/03-core-features--04-triggers-and-filters.yaml +++ b/.github/workflows/03-core-features--04-triggers-and-filters.yaml @@ -23,8 +23,8 @@ on: - "!03-core-features/filters/*.txt" ### https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule - # schedule: - # - cron: "0 0 * * *" # Midnight UTC + schedule: + - cron: "0 0 * * *" # Midnight UTC ## Manual Trigger workflow_dispatch: diff --git a/.github/workflows/04-advanced-features--05-third-party-auth.yaml b/.github/workflows/04-advanced-features--05-third-party-auth.yaml index 2da19bc9..7518c39b 100644 --- a/.github/workflows/04-advanced-features--05-third-party-auth.yaml +++ b/.github/workflows/04-advanced-features--05-third-party-auth.yaml @@ -24,4 +24,4 @@ jobs: uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1 with: aws-region: us-east-2 - role-to-assume: arn:aws:iam::917774925227:role/github-actions-role + role-to-assume: arn:aws:iam::510773627529:role/gha-role diff --git a/.gitignore b/.gitignore index 4a48538f..4282bf60 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.DS_store \ No newline at end of file +.DS_store +.lh/** \ No newline at end of file diff --git a/.lh/.lhignore b/.lh/.lhignore new file mode 100644 index 00000000..1de51008 --- /dev/null +++ b/.lh/.lhignore @@ -0,0 +1,6 @@ +# list file to not track by the local-history extension. comment line starts with a '#' character +# each line describe a regular expression pattern (search for 'Javascript regex') +# it will relate to the workspace directory root. for example: +# '.*\.txt' ignores any file with 'txt' extension +# '/test/.*' ignores all the files under the 'test' directory +# '.*/test/.*' ignores all the files under any 'test' directory (even under sub-folders) diff --git a/.lh/.vscode/settings.json.json b/.lh/.vscode/settings.json.json new file mode 100644 index 00000000..b11ee0b6 --- /dev/null +++ b/.lh/.vscode/settings.json.json @@ -0,0 +1,26 @@ +{ + "sourceFile": ".vscode/settings.json", + "activeCommit": 0, + "commits": [ + { + "activePatchIndex": 2, + "patches": [ + { + "date": 1777380663703, + "content": "Index: \n===================================================================\n--- \n+++ \n" + }, + { + "date": 1777529865372, + "content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,11 @@\n+{\n+ \"workbench.sideBar.location\": \"left\",\n+ \"editor.formatOnSave\": true,\n+ \"github-actions.workflows.pinned.workflows\": [],\n+ \"files.associations\": {\n+ \"**/.github/workflows/*.{yml,yaml}\": \"yaml\",\n+ \"**/Taskfile.{yml,yaml}\": \"yaml\"\n+ },\n+ \"editor.tabSize\": 2,\n+ \"extensions.ignoreRecommendations\": true\n+}\n\\ No newline at end of file\n" + }, + { + "date": 1777533733645, + "content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,16 +1,5 @@\n {\n- \"workbench.sideBar.location\": \"left\",\n- \"editor.formatOnSave\": true,\n- \"github-actions.workflows.pinned.workflows\": [],\n- \"files.associations\": {\n- \"**/.github/workflows/*.{yml,yaml}\": \"yaml\",\n- \"**/Taskfile.{yml,yaml}\": \"yaml\"\n- },\n- \"editor.tabSize\": 2,\n- \"extensions.ignoreRecommendations\": true\n-}\n-{\n \"workbench.sideBar.location\": \"right\",\n \"editor.formatOnSave\": true,\n \"github-actions.workflows.pinned.workflows\": [],\n \"files.associations\": {\n" + } + ], + "date": 1777380663703, + "name": "Commit-0", + "content": "{\n \"workbench.sideBar.location\": \"right\",\n \"editor.formatOnSave\": true,\n \"github-actions.workflows.pinned.workflows\": [],\n \"files.associations\": {\n \"**/.github/workflows/*.{yml,yaml}\": \"yaml\",\n \"**/Taskfile.{yml,yaml}\": \"yaml\"\n },\n \"editor.tabSize\": 2,\n \"extensions.ignoreRecommendations\": true\n}" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..dd711ab1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "workbench.sideBar.location": "right", + "editor.formatOnSave": true, + "github-actions.workflows.pinned.workflows": [], + "files.associations": { + "**/.github/workflows/*.{yml,yaml}": "yaml", + "**/Taskfile.{yml,yaml}": "yaml" + }, + "editor.tabSize": 2, + "extensions.ignoreRecommendations": true +} \ No newline at end of file diff --git a/06-authoring-actions/javascript-actions/typescript-action-with-build b/06-authoring-actions/javascript-actions/typescript-action-with-build index f70f1549..18a26812 160000 --- a/06-authoring-actions/javascript-actions/typescript-action-with-build +++ b/06-authoring-actions/javascript-actions/typescript-action-with-build @@ -1 +1 @@ -Subproject commit f70f15494fd5401f6722d81bbfd3918c5ed155a8 +Subproject commit 18a268124f8dc974149ff340da330211fc2811ba