Skip to content

Commit

Permalink
Merge pull request #269 from NebraLtd/master
Browse files Browse the repository at this point in the history
release(prod): Update miner to latest GA 2021.11.22.0
  • Loading branch information
shawaj authored Nov 23, 2021
2 parents f0bf19a + b0914dd commit 24663c3
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-miner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Miner GA
name: Update Miner GA (Testnet)
on:
repository_dispatch:
types: [miner-update]
Expand All @@ -18,7 +18,7 @@ jobs:
echo "We're not on the latest Helium GA release. Updating to $LATEST_GA with SHA $SHORT_SHA."
sed -i -E "s/FIRMWARE_VERSION=.*/FIRMWARE_VERSION=$LATEST_GA/g" docker-compose.yml
sed -i -E "s/nebraltd\/hm-miner:.*/nebraltd\/hm-miner:$SHORT_SHA/g" docker-compose.yml
sed -i -E "s/nebraltd\/hm-miner:.*/nebraltd\/hm-miner:arm64-$SHORT_SHA/g" docker-compose.yml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/update-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update Miner GA (Production)
on:
pull_request:
branches:
- master
types: [closed]

jobs:
miner-update:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set current date and latest GA as env variable, check PR title
run: |
# Get the latest GA release name
LATEST_GA=$(curl -s https://quay.io/v1/repositories/team-helium/miner/tags | jq -r --sort-keys '. | keys[] | select(. | endswith("GA"))' | tail -n 1 | sed 's/miner-arm64_//g' | sed 's/_GA//g')
echo "LATEST_GA=$LATEST_GA" >> $GITHUB_ENV
# Get the UTC date and time
echo "NOW=$(date -u)" >> $GITHUB_ENV
# Check pull request title
PR_TITLE_CHECK="release(testnet): Update miner to latest GA"
if grep -q "$PR_TITLE_CHECK" <<< "${{ github.event.pull_request.title }}"; then
UPDATED=true
echo "UPDATED=$UPDATED" >> $GITHUB_ENV
exit 0
fi
- name: Create Pull Request
if: env.UPDATED == 'true'
uses: devops-infra/[email protected]
with:
source_branch: master
target_branch: production
github_token: ${{ secrets.GITHUB_TOKEN }}
title: "release(prod): Update miner to latest GA ${{ env.LATEST_GA }}"
body: |
Update miner to latest GA ${{ env.LATEST_GA }}
Ref #${{ github.event.number }}
Pushed to testnet at ${{ env.NOW }}
draft: false
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- dbus-session
- diagnostics
environment:
- FIRMWARE_VERSION=2021.11.21.2
- FIRMWARE_VERSION=2021.11.22.0
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
- DBUS_SESSION_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
privileged: true
Expand All @@ -34,7 +34,7 @@ services:
- pktfwdr:/var/pktfwd

helium-miner:
image: nebraltd/hm-miner:2b50552
image: nebraltd/hm-miner:arm64-d760384
depends_on:
- dbus-session
- diagnostics
Expand All @@ -59,7 +59,7 @@ services:
diagnostics:
image: nebraltd/hm-diag:7e26f35
environment:
- FIRMWARE_VERSION=2021.11.21.2
- FIRMWARE_VERSION=2021.11.22.0
volumes:
- pktfwdr:/var/pktfwd
- miner-storage:/var/data
Expand All @@ -85,7 +85,7 @@ services:
- dbus:/session/dbus
environment:
- DBUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
- FIRMWARE_VERSION=2021.11.21.2
- FIRMWARE_VERSION=2021.11.22.0

volumes:
miner-storage:
Expand Down

0 comments on commit 24663c3

Please sign in to comment.