-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (41 loc) · 1.29 KB
/
Copy pathtest.yml
File metadata and controls
56 lines (41 loc) · 1.29 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on: [push]
jobs:
test-public-repo:
runs-on: ubuntu-latest
name: Get the sha from public repo
steps:
- name: Retrieve sha from a repo
id: remote_sha
uses: mego22/actions-git-sha@main
with:
repo: "https://github.com/mego22/dotfiles.git"
- name: Print sha
run: echo "The sha is ${{ steps.remote_sha.outputs.sha }}"
test-private-repo:
runs-on: ubuntu-latest
name: Get the sha from private repo
steps:
- name: Retrieve sha from a repo
id: remote_sha
uses: mego22/actions-git-sha@main
with:
username: "${{ github.actor }}"
password: "${{ secrets.TOKEN }}"
repo: "https://github.com/mego22/git-sha-test.git"
branch: "HEAD"
- name: Print sha
run: echo "The sha is ${{ steps.remote_sha.outputs.sha }}"
test-non-default-branch:
runs-on: ubuntu-latest
name: Get the sha from non-default branch
steps:
- name: Retrieve sha from a repo
id: remote_sha
uses: mego22/actions-git-sha@main
with:
username: "${{ github.actor }}"
password: "${{ secrets.TOKEN }}"
repo: "https://github.com/mego22/git-sha-test.git"
branch: "git-sha-test"
- name: Print sha
run: echo "The sha is ${{ steps.remote_sha.outputs.sha }}"