Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include action output values - was_dry_run and deleted_branches #19

Merged
merged 3 commits into from
Apr 14, 2022

Conversation

brentwatson
Copy link
Contributor

Description

GitHub actions can take inputs and also provide outputs.

Added some output params so that downstream steps can use the output from this action.

  • was_dry_run
  • deleted_branches

Example Usage:

jobs:
  delete_old_branches:
    name: Delete old git branches
    runs-on: ubuntu-latest
    steps:
      - name: Run delete-old-branches action
        id: delete_branches
        uses: beatlabs/delete-old-branches-action@v0.0.8
        with:
          repo_token: ${{ github.token }}
          date: '3 months ago'
          dry_run: true

      - name: Slack Notification
        uses: archive/github-actions-slack@v2.4.0
        with:
          slack-bot-user-oauth-access-token: ...
          slack-channel: ...
          slack-text: |
            *The following branches were deleted:*
            ${{steps.delete_branches.outputs.delete_branches}}
            Dry Run?: ${{steps.delete_branches.outputs.was_dry_run}}

More info about output with Docker are in the github docs here: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action#creating-an-action-metadata-file

pkossyfas
pkossyfas previously approved these changes Apr 14, 2022
Copy link
Contributor

@pkossyfas pkossyfas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 @brentwatson thanks for this contribution as well!

@pkossyfas pkossyfas merged commit 328c2fc into beatlabs:master Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants