Skip to content

Commit

Permalink
feat: output password
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielrufino committed Dec 7, 2024
1 parent ccd00ab commit 538227a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml → .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release
name: CD

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v*

permissions:
contents: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- uses: ./
with:
connection-string: mongodb://root:root@database:27017
output-password: '12345678'
- uses: actions/upload-artifact@v4
with:
name: dump-mongo${{ matrix.mongo-version }}
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ branding:
inputs:
connection-string:
required: true
output-password:
required: true

runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.connection-string }}
- ${{ inputs.output-password }}
7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/sh -l

apt update && apt upgrade -y
apt install zip -y

cd /action
mongodump $1

zip -P $2 -r dump.zip dump
rm -rf dump

mkdir $GITHUB_WORKSPACE/dump
cp -r dump $GITHUB_WORKSPACE/dump
cp -r dump.zip $GITHUB_WORKSPACE/dump

0 comments on commit 538227a

Please sign in to comment.