Skip to content

Commit c84020e

Browse files
committed
Use GHCR for docker image registry and add binary lib download scripts for ios,mac,windows
1 parent a379422 commit c84020e

5 files changed

Lines changed: 63 additions & 8 deletions

File tree

.github/workflows/build-ci-image.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,32 @@ on:
99
workflow_dispatch:
1010

1111
env:
12-
IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/stackwallet-ci
12+
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/stackwallet-ci
1313

1414
jobs:
1515
build:
1616
runs-on: ubuntu-24.04
17+
permissions:
18+
contents: read
19+
packages: write
1720
steps:
1821
- uses: actions/checkout@v6
1922

2023
- uses: docker/setup-buildx-action@v4
2124

2225
- uses: docker/login-action@v4
2326
with:
24-
username: ${{ secrets.DOCKERHUB_USERNAME }}
25-
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
2630

2731
- name: Build and push
2832
uses: docker/build-push-action@v7
2933
with:
3034
context: .
3135
push: true
3236
tags: |
33-
${{ env.IMAGE }}:latest
34-
${{ env.IMAGE }}:${{ github.sha }}
37+
${{ env.GHCR_IMAGE }}:latest
38+
${{ env.GHCR_IMAGE }}:${{ github.sha }}
3539
cache-from: type=gha
3640
cache-to: type=gha,mode=max

.github/workflows/test.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ on: [pull_request]
33
jobs:
44
test:
55
runs-on: ubuntu-24.04
6+
permissions:
7+
contents: read
8+
packages: read
69
container:
7-
image: stackwallet/stackwallet-ci:latest
10+
image: ghcr.io/${{ github.repository_owner }}/stackwallet-ci:latest
811
credentials:
9-
username: ${{ secrets.DOCKERHUB_USERNAME }}
10-
password: ${{ secrets.DOCKERHUB_TOKEN }}
12+
username: ${{ github.actor }}
13+
password: ${{ github.token }}
1114
steps:
1215
- name: Prepare repository
1316
uses: actions/checkout@v6

scripts/ios/download_all.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -x -e
4+
5+
mkdir -p build
6+
7+
PLUGINS_DIR=../../crypto_plugins
8+
9+
(cd "${PLUGINS_DIR}"/flutter_libepiccash/scripts/ios && ./download.sh)
10+
11+
(cd "${PLUGINS_DIR}"/flutter_libmwc/scripts/ios && ./download.sh)
12+
13+
# frostdart iOS is built from source by Cargokit at pod install time
14+
15+
wait
16+
echo "Done"

scripts/macos/download_all.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -x -e
4+
5+
mkdir -p build
6+
7+
PLUGINS_DIR=../../crypto_plugins
8+
9+
(cd "${PLUGINS_DIR}"/flutter_libepiccash/scripts/macos && ./download.sh)
10+
11+
(cd "${PLUGINS_DIR}"/flutter_libmwc/scripts/macos && ./download.sh)
12+
13+
(cd "${PLUGINS_DIR}"/frostdart/scripts/macos && ./download.sh)
14+
15+
wait
16+
echo "Done"

scripts/windows/download_all.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -x -e
4+
5+
mkdir -p build
6+
7+
PLUGINS_DIR=../../crypto_plugins
8+
9+
(cd "${PLUGINS_DIR}"/flutter_libepiccash/scripts/windows && ./download.sh)
10+
11+
(cd "${PLUGINS_DIR}"/flutter_libmwc/scripts/windows && ./download.sh)
12+
13+
(cd "${PLUGINS_DIR}"/frostdart/scripts/windows && ./download.sh)
14+
15+
wait
16+
echo "Done"

0 commit comments

Comments
 (0)