Skip to content

Commit

Permalink
chore(github-workflow): fix bankrupt issues again.. (#67015)
Browse files Browse the repository at this point in the history
## Why?

Switch to using `env` instead of `with`.
  • Loading branch information
samcx committed Jun 19, 2024
1 parent 445cc62 commit 9ff5c44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/next-repo-actions/dist/bankrupt/index.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .github/actions/next-repo-actions/src/bankrupt-issues.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { context, getOctokit } from '@actions/github'
import { getInput, info, setFailed } from '@actions/core'
import { info, setFailed } from '@actions/core'

async function main() {
if (!process.env.GITHUB_TOKEN) throw new TypeError('GITHUB_TOKEN not set')
if (!process.env.CREATED) throw new TypeError('CREATED not set')

const octokit = getOctokit(process.env.GITHUB_TOKEN)
const { owner, repo } = context.repo
const createdQuery = getInput('created')
const createdQuery = process.env.CREATED
const dateRange = createdQuery.split('..').join(' to ')
const body = `
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/issue_bankrupt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ jobs:
- uses: actions/setup-node@v4

- name: 'Bankrupt issues & send notification to Slack'
uses: ./.github/actions/next-repo-actions/dist/bankrupt/index.js
with:
created: ${{ github.event.inputs.created }}
run: node ./.github/actions/next-repo-actions/dist/bankrupt/index.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
CREATED: ${{ github.event.inputs.created }}

0 comments on commit 9ff5c44

Please sign in to comment.