-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
41 lines (41 loc) · 1.13 KB
/
action.yml
File metadata and controls
41 lines (41 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: "Gitopia Mirror Action"
description: "Mirrors your GitHub repo on Gitopia"
author: "Gitopia"
branding:
icon: arrow-up-circle
color: green
inputs:
gitopiaWallet:
description: 'Gitopia Wallet file contents. Can be passed in using $\{{ secrets.GITOPIA_WALLET }}'
required: true
remoteUrl:
description: "Gitopia Respository remote Url, eg, gitopia://address/repo_name"
required: true
force:
description: 'Force push to gitopia remote repository'
required: false
type: boolean
runs:
using: "composite"
steps:
- name: Install git-remote-helper for Gitopia
run: curl https://get.gitopia.com | bash
shell: bash
- name: Add Remote
run: |
git remote add gitopia ${{inputs.remoteUrl}}
shell: bash
- name: Push to Gitopia
if: ${{ !inputs.force }}
run: |
git push gitopia ${GITHUB_REF}
shell: bash
env:
GITOPIA_WALLET: ${{inputs.gitopiaWallet}}
- name: Push to Gitopia
if: ${{ inputs.force }}
run: |
git push gitopia ${GITHUB_REF} --force
shell: bash
env:
GITOPIA_WALLET: ${{inputs.gitopiaWallet}}