Skip to content

Commit

Permalink
[ci] add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
jackblack369 committed Dec 30, 2024
1 parent e436a62 commit 0fdd04e
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 920 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ jobs:
elif [ "${{ github.event_name }}" == "push" ]; then
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "tag" > event.txt
echo "${{ github.ref }}" | sed 's/refs\/tags\///' > tag_name.txt
tagInfo=echo "${{ github.ref }}" | sed 's/refs\/tags\///'
echo "$tagInfo" > tag_name.txt
echo "TAG_NAME=$tagInfo" >> $GITHUB_ENV
else
echo "push" > event.txt
echo "TAG_NAME=latest" >> $GITHUB_ENV
fi
fi
Expand All @@ -59,15 +62,15 @@ jobs:
run: make file_dep

- name: Build dingofs
run: make file_build only=//curvefs/src/* release=1
run: make file_build only=//dingofs/src/* release=1

- name: Install dingofs
run: |
make file_deploy_config
- name: Archive the dingofs directory
run: |
tar -czvf dingofs.tar.gz -C curvefs/docker/rocky9 dingofs
tar -czvf dingofs.tar.gz -C dingofs/docker/rocky9 dingofs
- name: Copy artifactory to another workflow
uses: actions/upload-artifact@v4
Expand All @@ -76,3 +79,12 @@ jobs:
path: ./dingofs.tar.gz
compression-level: 0

- name: Release
uses: softprops/action-gh-release@v2
if: ${{ github.event_name == 'push'}}
with:
files: dingofs.tar.gz
name: dingofs
tag_name: ${{ env.TAG_NAME }}
token: ${{ secrets.GH_TOKEN }}

6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

- name: Extract artifact
if: steps.check-event.outputs.continue == 'true'
run: tar -xzvf dingofs.tar.gz -C curvefs/docker/rocky9
run: tar -xzvf dingofs.tar.gz -C dingofs/docker/rocky9

- name: Set up Docker Buildx
if: steps.check-event.outputs.continue == 'true'
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
if: steps.check-event.outputs.continue == 'true'
uses: docker/build-push-action@v6
with:
context: ./curvefs/docker/rocky9
file: ./curvefs/docker/rocky9/Dockerfile
context: ./dingofs/docker/rocky9
file: ./dingofs/docker/rocky9/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
48 changes: 0 additions & 48 deletions .github/workflows/v1/ci-build.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/v1/docker-publish.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ test/client/configs/*
!test/client/configs/.gitkeep

projects/*
docker/curvebs
docker/base/*
docker/debian*/*so*
!docker/base/Dockerfile
Expand Down Expand Up @@ -125,4 +124,4 @@ third-party/installed
include/etcdclient/etcdclient.h
build

dingo-eureka/*
curvefs
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Usage:
Usage:
make install prefix=PREFIX only=TARGET
Examples:
make install prefix=/usr/local/curvefs only=etcd
make install prefix=/usr/local/dingofs only=etcd


## image
Usage:
make image tag=TAG os=OS
Examples:
make image tag=dingodb/curvefs:v1.2 os=rocky9
make image tag=dingodb/dingofs:v1.2 os=rocky9
endef
export help_msg

Expand Down
Loading

0 comments on commit 0fdd04e

Please sign in to comment.