Skip to content
file

GitHub Action

Slack File Upload

1.0.5 Latest version

Slack File Upload

file

Slack File Upload

Uploads file to slack

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Slack File Upload

uses: adrey/slack-file-upload-action@1.0.5

Learn more about this action in adrey/slack-file-upload-action

Choose a version

Slack file upload action

This action uploads file to slack

Inputs

token

Required Slack app token. See Internal app tokens

  • Create app
  • Add file:write permission
  • Install app to your workspase
  • Invite bot to required channels /invite <botname>
  • Use bot token from OAuth & Permissions page

path

Required Path to file

channel

Slack channel for upload

filename

Filename of file

filetype

A file type identifier.

initial_comment

The message text introducing the file in specified channels.

title

Title of file

Example usage

on: [push]

jobs:
  slack_upload_job:
    runs-on: ubuntu-latest
    name: Upload test file
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - run: echo "Test file " > test.txt
      - name: Upload to slack step
        uses: adrey/slack-file-upload-action@master
        with:
          token: ${{ secrets.SLACK_TOKEN }}
          path: test.txt
          channel: random