mirror of
https://github.com/lovellfelix/minio-deploy-action.git
synced 2025-12-13 20:51:14 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8adc15e705 | ||
|
|
266ac83dee | ||
|
|
52a5fb93c2 | ||
|
|
81cea32503 | ||
|
|
0dbf9b93c7 |
10
Dockerfile
10
Dockerfile
@@ -1,12 +1,4 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --assume-yes wget
|
||||
|
||||
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc \
|
||||
&& chmod +x mc \
|
||||
&& mv mc /usr/local/bin/ \
|
||||
&& mc --help
|
||||
FROM minio/mc:RELEASE.2020-10-03T02-54-56Z
|
||||
|
||||
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
21
README.md
21
README.md
@@ -1,5 +1,6 @@
|
||||
# Minio Deploy GitHub Action
|
||||
|
||||
This is a fork from hkdobrev/minio-deploy-action with some minor changes.
|
||||
Run [minio client][] in GitHub Actions to deploy files to Minio object storage.
|
||||
|
||||
It uses the `mc mirror --overwrite` command to deploy.
|
||||
@@ -10,15 +11,15 @@ Put the following step in your workflow:
|
||||
|
||||
```yml
|
||||
- name: Minio Deploy
|
||||
uses: hkdobrev/minio-deploy-action@v1
|
||||
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: '/'
|
||||
uses: lovellfelix/minio-deploy-action@v1
|
||||
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:
|
||||
@@ -41,7 +42,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Minio Deploy
|
||||
uses: hkdobrev/minio-deploy-action@v1
|
||||
uses: lovellfelix/minio-deploy-action@v1
|
||||
with:
|
||||
endpoint: ${{ secrets.MINIO_ENDPOINT }}
|
||||
access_key: ${{ secrets.MINIO_ACCESS_KEY }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: 'Minio Deploy'
|
||||
name: 'Minio upload'
|
||||
description: 'Deploy to Minio Storage'
|
||||
author: 'hkdobrev'
|
||||
author: 'lovellfelix'
|
||||
inputs:
|
||||
endpoint:
|
||||
description: 'Minio endpoint of object storage host'
|
||||
@@ -34,4 +34,4 @@ runs:
|
||||
- '${{ inputs.bucket }}${{ inputs.target_dir }}'
|
||||
branding:
|
||||
icon: 'upload-cloud'
|
||||
color: 'red'
|
||||
color: 'black'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mc alias set deploy $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
|
||||
mc alias set deploy $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY --api S3v4
|
||||
|
||||
mc mirror --overwrite $1 "deploy/$2"
|
||||
|
||||
Reference in New Issue
Block a user