ci: Migrate away from Google Cloud Storage
This commit is contained in:
parent
9db91e976e
commit
b33893741f
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
chmod --recursive go+r /root/.cargo/registry
|
||||
- shell: bash
|
||||
run: |
|
||||
staging="${{ matrix.target }}"
|
||||
staging="radicle-${{ matrix.target }}"
|
||||
mkdir -p "$staging"
|
||||
cp target/${{ matrix.target }}/release/radicle-httpd "$staging"/
|
||||
cp target/${{ matrix.target }}/release/radicle-node "$staging"/
|
||||
|
|
@ -53,19 +53,15 @@ jobs:
|
|||
cp target/${{ matrix.target }}/release/git-remote-rad "$staging"/
|
||||
tar czf "$staging.tar.gz" "$staging"
|
||||
cp "$staging.tar.gz" "$staging"/
|
||||
- id: 'auth'
|
||||
uses: 'google-github-actions/auth@v1'
|
||||
with:
|
||||
workload_identity_provider: 'projects/281042598092/locations/global/workloadIdentityPools/github-actions/providers/google-cloud'
|
||||
service_account: 'github-actions@radicle-services.iam.gserviceaccount.com'
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v1'
|
||||
- id: 'upload-file'
|
||||
uses: 'google-github-actions/upload-cloud-storage@v1'
|
||||
with:
|
||||
path: ${{ matrix.target }}
|
||||
destination: heartwood-artifacts/${{ github.sha }}/
|
||||
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "$SSH_PRIVATE_KEY" >ssh-private-key
|
||||
chmod go-rwx ssh-private-key
|
||||
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key github-actions@files.radicle.xyz mkdir -p "/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/${{ github.sha }}"
|
||||
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key -r radicle-${{ matrix.target }}/* "github-actions@files.radicle.xyz:/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/${{ github.sha }}/"
|
||||
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key github-actions@files.radicle.xyz ln -snf "/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/${{ github.sha }}" "/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/latest"
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
release-macos-binaries:
|
||||
permissions:
|
||||
|
|
@ -97,7 +93,7 @@ jobs:
|
|||
cargo build --target ${{ matrix.target }} --bin git-remote-rad --release
|
||||
- shell: bash
|
||||
run: |
|
||||
staging="${{ matrix.target }}"
|
||||
staging="radicle-${{ matrix.target }}"
|
||||
mkdir -p "$staging"
|
||||
cp target/${{ matrix.target }}/release/radicle-httpd "$staging"/
|
||||
cp target/${{ matrix.target }}/release/radicle-node "$staging"/
|
||||
|
|
@ -105,15 +101,12 @@ jobs:
|
|||
cp target/${{ matrix.target }}/release/git-remote-rad "$staging"/
|
||||
tar czf "$staging.tar.gz" "$staging"
|
||||
cp "$staging.tar.gz" "$staging"/
|
||||
- id: 'auth'
|
||||
uses: 'google-github-actions/auth@v1'
|
||||
with:
|
||||
workload_identity_provider: 'projects/281042598092/locations/global/workloadIdentityPools/github-actions/providers/google-cloud'
|
||||
service_account: 'github-actions@radicle-services.iam.gserviceaccount.com'
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v1'
|
||||
- id: 'upload-file'
|
||||
uses: 'google-github-actions/upload-cloud-storage@v1'
|
||||
with:
|
||||
path: ${{ matrix.target }}
|
||||
destination: heartwood-artifacts/${{ github.sha }}
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "$SSH_PRIVATE_KEY" >ssh-private-key
|
||||
chmod go-rwx ssh-private-key
|
||||
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key github-actions@files.radicle.xyz mkdir -p "/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/${{ github.sha }}"
|
||||
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key -r radicle-${{ matrix.target }}/* "github-actions@files.radicle.xyz:/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/${{ github.sha }}/"
|
||||
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key github-actions@files.radicle.xyz ln -snf "/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/${{ github.sha }}" "/mnt/HC_Volume_30083854/releases/${{ matrix.target }}/latest"
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue