mamal72 / minio-perfect-deploy-action

GitHub Action to perfectly deploy files with Minio client to a Minio bucket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minio Deploy GitHub Action

Run minio client in GitHub Actions to deploy files to Minio object storage.

It uses the mc mirror --remove --overwrite command to deploy.

It also sets the policy of the uploaded objects to public, so it can be used for static serving purposes.

Usage

Put the following step in your workflow:

- name: Minio Deploy
  uses: mamal72/minio-perfect-deploy-action@main
  with:
    endpoint: ${{ secrets.MINIO_ENDPOINT }}
    access_key: ${{ secrets.MINIO_ACCESS_KEY }}
    secret_key: ${{ secrets.MINIO_SECRET_KEY }}
    bucket: 'mybucket'
    # Optional inputs with their defaults:
    source_dir: 'public'
    target_dir: '/'

Workflow example:

name: Deploy

on:
  pull_request:
    types: [opened, synchronize]
  push:
    branches:
      - master

jobs:
  build:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master

      - name: Minio Deploy
        uses: mamal72/minio-perfect-deploy-action@main
        with:
          endpoint: ${{ secrets.MINIO_ENDPOINT }}
          access_key: ${{ secrets.MINIO_ACCESS_KEY }}
          secret_key: ${{ secrets.MINIO_SECRET_KEY }}
          bucket: 'mybucket'
          source_dir: 'public'
          target_dir: '/'

License

Licensed under the MIT license. See LICENSE.

About

GitHub Action to perfectly deploy files with Minio client to a Minio bucket

License:MIT License


Languages

Language:Dockerfile 71.6%Language:Shell 28.4%