Skip to content

Commit

Permalink
Use gh tool (#106)
Browse files Browse the repository at this point in the history
* use gh tool instead of third party gh action

Signed-off-by: galal-hussein <[email protected]>

* Fix checksum

Signed-off-by: galal-hussein <[email protected]>

* Add GH_TOKEN env

Signed-off-by: galal-hussein <[email protected]>

---------

Signed-off-by: galal-hussein <[email protected]>
  • Loading branch information
galal-hussein authored Jun 21, 2024
1 parent 3879912 commit bf72d39
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
tags:
- "chart-*"

env:
GH_TOKEN: ${{ github.token }}

name: Chart
permissions:
contents: write
Expand All @@ -19,10 +22,8 @@ jobs:
make package-chart;
- name: Release Chart
uses: softprops/action-gh-release@v2
with:
files: |
deploy/*
run: |
gh release upload ${{ github.ref_name }} deploy/*
- name: Index Chart
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
tags:
- "v*"

env:
GH_TOKEN: ${{ github.token }}

name: Release
permissions:
contents: write
Expand All @@ -28,10 +31,8 @@ jobs:
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials password | DOCKER_PASSWORD ;
- name: release binaries
uses: softprops/action-gh-release@v2
with:
files: |
bin/*
run: |
gh release upload ${{ github.ref_name }} bin/*
- name: Login to Container Registry
uses: docker/login-action@v3
Expand Down
16 changes: 16 additions & 0 deletions ops/checksum
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -ex

cd $(dirname $0)/..

CHECKSUM_DIR=${CHECKSUM_DIR:-./bin}

sumfile="${CHECKSUM_DIR}/sha256sum.txt"
echo -n "" > "${sumfile}"

files=$(ls ${CHECKSUM_DIR} | grep -v "sha256sum.txt")
for file in ${files}; do
sha256sum "${CHECKSUM_DIR}/${file}" | sed "s;$(dirname ${CHECKSUM_DIR}/${file})/;;g" >> "${sumfile}"
done

cat "${sumfile}"
1 change: 1 addition & 0 deletions ops/ci
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
cd $(dirname $0)

./build
./checksum
./test
./validate
./validate-ci
Expand Down

0 comments on commit bf72d39

Please sign in to comment.