Skip to content

Commit 3d7cb14

Browse files
committed
feat: upload pre-loaded balena images to DO spaces instead of Github on release
1 parent 9b17f24 commit 3d7cb14

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

.github/actions/release-images/action.yml

+24-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,37 @@ inputs:
77
repo_token:
88
required: true
99
description: "Github repository personal access token"
10+
access_key:
11+
required: true
12+
description: "Digital Ocean spaces access key"
13+
secret_key:
14+
required: true
15+
description: "Digital Ocean spaces secret key"
16+
space_name:
17+
required: true
18+
description: "Digital Ocean spaces name"
19+
space_region:
20+
required: true
21+
description: "Digital Ocean spaces region"
22+
tag:
23+
description: "The tag version of the release"
1024
runs:
1125
using: "composite"
1226
steps:
1327
- name: Download all workflow artifacts
1428
uses: actions/download-artifact@v3
29+
- uses: BetaHuhn/do-spaces-action@v2
30+
with:
31+
access_key: ${{ inputs.access_key}}
32+
secret_key: ${{ inputs.secret_key }}
33+
space_name: ${{ inputs.space_name }}
34+
space_region: ${{ inputs.space_region }}
35+
source: artifacts
36+
out_dir: "releases_${{ inputs.tag }}"
1537
- name: "✏️ Upload imgs and release"
1638
uses: "marvinpinto/action-automatic-releases@latest"
1739
with:
1840
repo_token: "${{ inputs.repo_token }}"
1941
prerelease: ${{ inputs.pre-release }}
20-
files: |
21-
artifacts/*
42+
# files: |
43+
# artifacts/*

.github/workflows/balena-tag-release.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,23 @@ jobs:
6767
balena_device: ${{ matrix.image }}
6868
tag: ${{ needs.balena-deploy.outputs.github_tag }}
6969

70-
github-release:
70+
github-images-release:
7171
runs-on: ubuntu-latest
7272
needs: [balena-deploy, balena-build-images]
7373
steps:
7474
- name: Checkout
7575
uses: actions/checkout@v2
7676

77-
- name: Create Github pre-release
77+
- name: Create Github release and upload images
7878
uses: ./.github/actions/release-images
7979
with:
8080
pre-release: false
8181
repo_token: "${{ secrets.PAT }}"
82+
access_key: ${{ secrets.ACCESS_KEY}}
83+
secret_key: ${{ secrets.SECRET_KEY }}
84+
space_name: ${{ secrets.SPACE_NAME }}
85+
space_region: ${{ secrets.SPACE_REGION }}
86+
tag: ${{ needs.balena-deploy.outputs.github_tag }}
8287

8388
#TODO: Download and inject content into the image
8489
# - name: Mount Image

balena.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Earth Defender's Toolkit Offline"
22
type: "sw.application"
3-
version: 0.4.5
3+
version: 0.4.6
44
description: "A low-energy device that creates an access-point serving applications, bridging them and exposing curated content offline.
55
Software stack and content are automatically updated while online, and can be updated offline."
66
assets:

0 commit comments

Comments
 (0)