-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup-only.yml
48 lines (40 loc) · 1.54 KB
/
setup-only.yml
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
on: [push]
jobs:
setup:
runs-on: ubuntu-latest
name: setup
# In GitHub Actions environment variables can be provided at the workflow level, job level, or step level.
# See GitHub documentation for more details: https://docs.github.com/en/actions/learn-github-actions/environment-variables
env:
P4PORT: ${{ secrets.P4PORT }}
P4USER: ${{ secrets.P4USER }}
steps:
# Checkout assets stored in GitHub
- name: Checkout
uses: actions/checkout@v2
# Install p4 cli and cache it if we are running within a self hosted runner
- name: p4 setup
uses: perforce/setup-p4@v1
with:
p4_version: 21.2
- run: |
which p4
p4 -V
- run: echo "${{ secrets.P4PASSWD }}" | p4 -p ${{ secrets.P4PORT }} -u ${{ secrets.P4USER }} login
- run: |
cat <<EOF > /tmp/helix-core-client.cfg
Client: github-actions-setup-p4
Owner: andy_boutte
Description:
Created by
Root: /tmp
Options: noallwrite noclobber nocompress unlocked modtime rmdir
SubmitOptions: leaveunchanged
LineEnd: local
View:
//guest/perforce_software/sdp/... //github-actions-setup-p4/guest/perforce_software/sdp/...
EOF
- run: cat /tmp/helix-core-client.cfg | p4 -p ${{ secrets.P4PORT }} -u ${{ secrets.P4USER }} client -i
- run: |
export P4CLIENT="github-actions-setup-p4"
p4 -p ${{ secrets.P4PORT }} -u ${{ secrets.P4USER }} sync