-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests-only] enable linter, docker, releases in gh actions (#3535)
* enable linter in gh action * enable linter in gh action * stick to existing lint config * stick to mockery and go-generate * add changelog step * remove changelog validation step * remove changelog validation and linting step from drone * remove changelog depends_on condition * fix build step * merge dockerfiles from master * merge tools from master * merge release and docker workflows from master * fix ceph storage implementation * remove release and docker pipelines from drone * fix starlark syntax * fix ceph storage driver * fix ceph storage driver EmptyRecycle * fix ceph storage driver lock methods * fix ceph storage driver upload and space methods * add changelog
- Loading branch information
Showing
18 changed files
with
331 additions
and
478 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Check Changelog | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- ".github/**" | ||
- "Makefile" | ||
- "tools/**" | ||
- "docs/**" | ||
- "tests/**" | ||
- ".drone.star" | ||
- ".drone.env" | ||
- ".fossa.yml" | ||
- ".gitignore" | ||
- ".gitmodules" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
jobs: | ||
check-changelog: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup Go environment | ||
uses: actions/[email protected] | ||
with: | ||
go-version-file: go.mod | ||
- name: Check changelog | ||
run: make check-changelog PR=${{ github.event.pull_request.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build Docker | ||
on: | ||
push: | ||
branches: | ||
- "edge" | ||
tags: | ||
- "*" | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
runs-on: self-hosted | ||
strategy: | ||
matrix: | ||
include: | ||
- tag: reva:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }} | ||
file: Dockerfile.reva | ||
- tag: revad:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }} | ||
file: Dockerfile.revad | ||
- tag: revad:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }}-eos | ||
file: Dockerfile.revad-eos | ||
- tag: revad:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }}-ceph | ||
file: Dockerfile.revad-ceph | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
if: ${{ github.event_name != 'pull_request' }} | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build ${{ ((github.event_name != 'pull_request') && 'and push') || '' }} ${{ matrix.tag }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
file: ${{ matrix.file }} | ||
tags: ${{ ((github.event_name != 'pull_request') && format('{0}/{1}', secrets.DOCKERHUB_ORGANIZATION, matrix.tag)) || '' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Lint | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- "go.mod" | ||
- "go.sum" | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup Go environment | ||
uses: actions/[email protected] | ||
with: | ||
go-version-file: go.mod | ||
- name: Run linters | ||
run: make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Go environment | ||
uses: actions/[email protected] | ||
with: | ||
go-version-file: go.mod | ||
- name: Make distribution | ||
run: make dist VERSION=${{ github.ref_name }} GIT_COMMIT=${{ github.sha }} GO_VERSION=$(go version | awk '{print $3}') | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: "dist/*" | ||
body_path: "changelog/NOTE.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,5 @@ tmp/ | |
|
||
# drone | ||
.drone.yml | ||
|
||
toolchain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.