Skip to content

0.3.35

0.3.35 #1133

name: Test GA bump-upstream template
on:
push:
pull_request:
branches:
- master
env:
ENVIRONMENT: TEST
INITIAL_VERSION: "0.1.0"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: yarn install
- run: yarn build
# Simulate Github Actions run on an actual DAppNode package
- name: Setup a "template" mock package to test locally
run: node dist/dappnodesdk.js init --yes --force --dir template
- name: Add upstream repo and arg to manifest
run: |
cat <<EOT > ./template/dappnode_package.json
{
"name": "ipfs.dnp.dappnode.eth",
"version": "${{ env.INITIAL_VERSION }}",
"description": "ipfs.dnp.dappnode.eth description",
"type": "service",
"author": "runner",
"categories": ["Developer tools"],
"links": {
"homepage": "https://your-project-homepage-or-docs.io"
},
"license": "GPL-3.0",
"upstreamRepo": "ipfs/go-ipfs",
"upstreamArg": "UPSTREAM_VERSION",
"upstreamVersion": "v0.4.0"
}
EOT
- name: Add upstream arg to compose
run: |
cat <<EOT > ./template/docker-compose.yml
version: "3.5"
services:
ipfs.dnp.dappnode.eth:
build:
context: .
args:
UPSTREAM_VERSION: v0.4.0
image: "ipfs.dnp.dappnode.eth:${{ env.INITIAL_VERSION }}"
restart: unless-stopped
EOT
- name: Init a git repository at the template directory
run: |
cd template
git init
git config user.name "DAppNodeBot"
git config user.email "[email protected]"
git add .
git commit -m "Initial commit"
git remote add origin .
- name: Bump upstream version
run: |
cd template
node ../dist/dappnodesdk.js github-action bump-upstream --eth_provider=infura -f
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}