Skip to content

Commit 09f252a

Browse files
authored
Merge pull request #3 from s0/js-native
Use JS natively instead of docker
2 parents 0f67cab + f9edbd4 commit 09f252a

File tree

10 files changed

+1271
-89
lines changed

10 files changed

+1271
-89
lines changed

Diff for: .github/workflows/cron.yml

+25
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,31 @@ jobs:
6666
FOLDER: dummy
6767
SSH_PRIVATE_KEY: ${{ secrets.TESTING_PRIVATE_KEY }}
6868
KNOWN_HOSTS_FILE: action/resources/known_hosts_github.com
69+
deploy-ssh-twice:
70+
name: Test deploying multiple times in one job
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@master
74+
- name: Setup Dummy Data
75+
run: |
76+
mkdir dummy1
77+
echo "foobar1" > "dummy1/baz"
78+
mkdir dummy2
79+
echo "foobar2" > "dummy2/baz"
80+
- name: Deploy
81+
uses: ./
82+
env:
83+
REPO: git@github.com:s0/git-publish-subdir-action-tests.git
84+
BRANCH: branch-d
85+
FOLDER: dummy1
86+
SSH_PRIVATE_KEY: ${{ secrets.TESTING_PRIVATE_KEY }}
87+
- name: Deploy
88+
uses: ./
89+
env:
90+
REPO: git@github.com:s0/git-publish-subdir-action-tests.git
91+
BRANCH: branch-d
92+
FOLDER: dummy2
93+
SSH_PRIVATE_KEY: ${{ secrets.TESTING_PRIVATE_KEY }}
6994
deploy-locally:
7095
name: Test deploying to another branch of same repo
7196
runs-on: ubuntu-latest

Diff for: .github/workflows/test.yml

+43-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test deployments
1+
name: Test branch
22
on: push
33

44
jobs:
@@ -64,6 +64,31 @@ jobs:
6464
FOLDER: dummy
6565
SSH_PRIVATE_KEY: ${{ secrets.TESTING_PRIVATE_KEY }}
6666
KNOWN_HOSTS_FILE: action/resources/known_hosts_github.com
67+
deploy-ssh-twice:
68+
name: Test deploying multiple times in one job
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@master
72+
- name: Setup Dummy Data
73+
run: |
74+
mkdir dummy1
75+
echo "foobar1" > "dummy1/baz"
76+
mkdir dummy2
77+
echo "foobar2" > "dummy2/baz"
78+
- name: Deploy
79+
uses: ./
80+
env:
81+
REPO: git@github.com:s0/git-publish-subdir-action-tests.git
82+
BRANCH: branch-d
83+
FOLDER: dummy1
84+
SSH_PRIVATE_KEY: ${{ secrets.TESTING_PRIVATE_KEY }}
85+
- name: Deploy
86+
uses: ./
87+
env:
88+
REPO: git@github.com:s0/git-publish-subdir-action-tests.git
89+
BRANCH: branch-d
90+
FOLDER: dummy2
91+
SSH_PRIVATE_KEY: ${{ secrets.TESTING_PRIVATE_KEY }}
6792
deploy-locally:
6893
name: Test deploying to another branch of same repo
6994
runs-on: ubuntu-latest
@@ -79,4 +104,20 @@ jobs:
79104
REPO: self
80105
BRANCH: test-branch
81106
FOLDER: dummy
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
ci:
109+
name: Run Build and check output is checked-in
110+
runs-on: ubuntu-latest
111+
steps:
112+
- uses: actions/checkout@master
113+
- name: Use Node.js
114+
uses: actions/setup-node@v1
115+
with:
116+
node-version: 10.x
117+
- name: 'Build'
118+
run: |
119+
cd action
120+
npm install
121+
npm run build
122+
- name: Check no files have changes
123+
run: git diff --exit-code

Diff for: Dockerfile

-21
This file was deleted.

Diff for: action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: 'Push git subdirectory as branch'
33
description: 'Push a subdirectory as a branch to any git repo over SSH (or to the local repo)'
44
author: 'Sam Lanning <sam@samlanning.com>'
55
runs:
6-
using: 'docker'
7-
image: 'Dockerfile'
6+
using: 'node12'
7+
main: 'action/dist/index.js'
88
branding:
99
icon: 'upload-cloud'
1010
color: 'purple'

Diff for: action/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/node_modules
1+
/node_modules
2+
/lib

0 commit comments

Comments
 (0)