Skip to content

jansitarski/minio-copy-and-discord-webhook

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minio Upload and Discord Webhook

  • Run minio client in GitHub Actions to deploy files to MinIO object storage.
  • Send webhook notification to Discord integration.

It uses the mc cp --recursive command to upload.

Disclaimer

This is a container action, so it doensn't work in Windows runners.
Requests have to be made to console port

Usage

Put the following step in your workflow:

- name: Minio upload
  uses: jansitarski/minio-copy-discord-notify@v1
  with:
    endpoint: ${{ secrets.MINIO_ADDRESS }}
    access_key: ${{ secrets.MINIO_ACCESS_KEY }}
    secret_key: ${{ secrets.MINIO_SECRET_KEY }}
    bucket: 'bucket-name'
    source_file: 'folder/file'
    target_dir: '/'
    # Optional inputs with their defaults:
    webhook: 'https://discord.com/api/webhooks/123/w3bh00k_t0k3n'
    webhook_title: "MinIO upload"
    webhool_desc: "Uploaded file to bucket"

Workflow example of uploading build artifacts to current date named folder:

- name: Get current date
  id: date
  run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Minio Upload and Discord webhook
  uses: jansitarski/minio-copy-discord-notify@v1
  with:
    endpoint: ${{ secrets.MINIO_ADDRESS }}
    access_key: ${{ secrets.MINIO_ACCESS_KEY }}
    secret_key: ${{ secrets.MINIO_SECRET_KEY }}
    bucket: ${{ secrets.MINIO_BUCKET }}
    source_file: 'build/Build-linux.tar'
    target_dir: '/Release-${{ steps.date.outputs.date }}/linux-amd64/'
    # Optional inputs with their defaults:
    webhook: ${{ secrets.DISCORD_WEBHOOK }}
    webhook_title: "MinIO upload"
    webhook_desc: "Uploaded file to $RELEASE_NAME bucket"
  env:
    RELEASE_NAME: Release-${{ steps.date.outputs.date }}

License

Licensed under the MIT license. See LICENSE.

About

GitHub Action to deploy files with Minio client to a Minio bucket and send notify to webhook

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 73.7%
  • Dockerfile 26.3%