diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..250bda8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Publish Docker image + +on: + push: + branches: + - main + +jobs: + push_to_registry: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Docker Login + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: hedge10/minio-gh-workflow + - name: Build and push Docker image + id: push + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..74e5d7c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM minio/minio + +CMD ["server", "/data", "--address=0.0.0.0:9000", "--console-address=0.0.0.0:9001"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..bba4d26 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Minio for Github Action + +This repository provides an image to be used either for local testing or for Github workflows. + +It extends the default image by setting up \ No newline at end of file