-
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.
Migrate the buildAndPublishDocker job from Drone to GitHub Actions
- Loading branch information
1 parent
878df62
commit ea4abdf
Showing
23 changed files
with
174 additions
and
265 deletions.
There are no files selected for viewing
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 was deleted.
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 |
---|---|---|
@@ -1,26 +1,42 @@ | ||
name: Build Docker | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
pull_request: | ||
paths-ignore: | ||
- "tools/**" | ||
- "docs/**" | ||
- ".drone.star" | ||
- ".drone.env" | ||
- ".fossa.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
runs-on: self-hosted | ||
strategy: | ||
matrix: | ||
include: | ||
- tag: reva:latest | ||
file: Dockerfile.reva | ||
- tag: revad:latest | ||
file: Dockerfile.revad | ||
- tag: revad:latest-eos | ||
file: Dockerfile.revad-eos | ||
- tag: revad:latest-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: Build | ||
- 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: . | ||
file: Dockerfile.revad | ||
push: ${{ github.event_name != 'pull_request' }} | ||
file: ${{ matrix.file }} | ||
tags: ${{ ((github.event_name != 'pull_request') && format('{0}/{1}', secrets.DOCKERHUB_USERNAME, 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 |
---|---|---|
|
@@ -23,17 +23,5 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
go-version-file: go.mod | ||
- name: Clone calens | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: restic/calens | ||
path: calens | ||
fetch-depth: 0 | ||
ref: v0.2.0 | ||
- name: Install calens | ||
run: cd calens && go install | ||
- name: Check if changelog exists | ||
run: | | ||
$(go env GOPATH)/bin/calens | \ | ||
sed -n '/^Changelog for reva unreleased (UNRELEASED)/,/^Details/p' | \ | ||
grep -E '^ \* [[:alpha:]]{3} #${{ github.event.pull_request.number }}: ' | ||
- name: Check changelog | ||
run: make check-changelog PR=${{ github.event.pull_request.number }} |
This file was deleted.
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,15 @@ | ||
name: Lint | ||
on: [pull_request, 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,15 @@ | ||
name: Test | ||
on: [pull_request, push, workflow_dispatch] | ||
|
||
jobs: | ||
test: | ||
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: Test | ||
run: make test |
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.