Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
cryi committed Apr 9, 2024
0 parents commit 5d509df
Show file tree
Hide file tree
Showing 25 changed files with 1,774 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
80 changes: 80 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
outputs:
NEEDS_RELEASE: ${{ steps.prep.outputs.NEEDS_RELEASE }}
VERSION: ${{ steps.prep.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: setup eli
uses: alis-is/setup-eli@v1

- name: test tezbox
run: |
eli ./tests/all.lua
- name: prep
id: prep
run: |
VERSION=$(eli -e "info = require'src.version-info'; io.write(info.VERSION)")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
if git tag -l "$VERSION" | grep "$VERSION"; then
echo "Version $VERSION already exists";
else
echo "Found new version - $VERSION"
echo "NEEDS_RELEASE=true" >> $GITHUB_OUTPUT
fi
echo "CURRENT_DATE=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: build tezbox
if: ${{ steps.prep.outputs.NEEDS_RELEASE == 'true'}}
run: |
export ELI_PATH=$PWD/eli
eli ./build/build.lua
- name: publish
uses: ncipollo/release-action@v1
if: ${{ steps.prep.outputs.NEEDS_RELEASE == 'true'}}
with:
artifacts: "bin/tezbox"
tag: ${{ steps.prep.outputs.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: build tezos v19.1
uses: docker/build-push-action@v5
if: ${{ steps.prep.outputs.NEEDS_RELEASE == 'true'}}
with:
file: containers/tezos/Containerfile
context: .
platforms: linux/amd64
build-args: |
IMAGE_TAG=v19.1
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: ghcr.io/tez-capital/tezbox:tezos-v19.1.${{steps.prep.outputs.CURRENT_DATE}},ghcr.io/tez-capital/tezbox:tezos-v19.1,ghcr.io/tez-capital/tezbox:latest
push: true
provenance: false


5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
archive
.vscode

bin/*
!bin/.gitkeep
Empty file added bin/.gitkeep
Empty file.
Loading

0 comments on commit 5d509df

Please sign in to comment.