-
Notifications
You must be signed in to change notification settings - Fork 76
82 lines (75 loc) · 2.64 KB
/
publish-chrome.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Publish Chrome
on:
workflow_dispatch:
inputs:
builder_ip:
description: "IP address of the builder"
required: true
type: string
chrome_version:
description: "Version of Chrome to build"
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Write SSH keys
run: |
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.LINODE_SSH_PUBLIC_KEY }}" > ~/.ssh/linode_ed25519.pub
chmod 600 ~/.ssh/linode_ed25519.pub
echo "${{ secrets.LINODE_SSH_PRIVATE_KEY }}" > ~/.ssh/linode_ed25519
chmod 600 ~/.ssh/linode_ed25519
ssh-keyscan -H "${{ inputs.builder_ip }}" > ~/.ssh/known_hosts
# - name: Setup
# run: |
# ssh -i ~/.ssh/linode_ed25519 \
# -o PasswordAuthentication=no \
# -t root@${{ inputs.builder_ip }} \
# 'bash -s' < ./build/chrome/scripts/setup.sh
#
# - name: Amd64
# run: |
# ssh -i ~/.ssh/linode_ed25519 \
# -o PasswordAuthentication=no \
# -t chrome@${{ inputs.builder_ip }} \
# 'bash -s ${{ inputs.chrome_version }}' < ./build/chrome/scripts/amd64.sh
- name: Arm64
run: |
ssh -i ~/.ssh/linode_ed25519 \
-o PasswordAuthentication=no \
-o ServerAliveInterval=60 \
-t chrome@${{ inputs.builder_ip }} \
'bash -s ${{ inputs.chrome_version }}' < ./build/chrome/scripts/arm64.sh
- name: Download artifacts
run: |
ssh -i ~/.ssh/linode_ed25519 \
-o PasswordAuthentication=no \
-t chrome@${{ inputs.builder_ip }} \
'zip -r output.zip ./output'
scp -i ~/.ssh/linode_ed25519 \
-o PasswordAuthentication=no \
chrome@${{ inputs.builder_ip }}:/home/chrome/output.zip \
${{ github.workspace }}/build/chrome/output.zip
unzip ${{ github.workspace }}/build/chrome/output.zip -d ${{ github.workspace }}/build/chrome/output
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
#
# - name: Login to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# file: ./build/chrome/Dockerfile
# push: true
# platforms: linux/amd64,linux/arm64
# tags: test