Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Initialize "Project thread update reminders" workflow for future development (#2152)

Zack Krida500dc57ccde9
diff --git a/.github/workflows/project_thread_update_reminders.yml b/.github/workflows/project_thread_update_reminders.yml
new file mode 100644
index 000000000..67b417773
--- /dev/null
+++ b/.github/workflows/project_thread_update_reminders.yml
@@ -0,0 +1,32 @@
+# This workflow is currently a stub to allow for testing the
+# project thread update action manually in the GitHub UI.
+# Actions must be present in the main branch to appear there.
+name: Project Thread Update Reminders
+
+on:
+ workflow_dispatch:
+ inputs:
+ dry_run:
+ type: boolean
+ description: "Dry run"
+ required: true
+ default: true
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: "16"
+
+ - name: Run project thread check
+ run: node ./src/project_thread_updates.js
+ working-directory: ./automations/js
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ DRY_RUN: ${{ inputs.dry_run }}
diff --git a/automations/js/src/project_thread_updates.js b/automations/js/src/project_thread_updates.js
new file mode 100644
index 000000000..7db8f99da
--- /dev/null
+++ b/automations/js/src/project_thread_updates.js
@@ -0,0 +1,11 @@
+// const github = require('@actions/github')
+const core = require('@actions/core')
+
+async function run() {
+ const isDryRun = core.getBooleanInput('dry_run') ?? false
+ core.info(`Dry run status: ${isDryRun}`)
+ core.info('Success.')
+ return true
+}
+
+run()