-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from Shopify/github-actions-github-pages
Github actions will now build debian packages and github pages on master push
- Loading branch information
Showing
9 changed files
with
90 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
sudo apt-get update | ||
sudo apt-get install -y make | ||
|
||
# We set this here, so it's the same between the copydb and sharding debian | ||
# package. | ||
DATETIME=$(date -u +%Y%m%d%H%M%S) | ||
|
||
git status | ||
|
||
make copydb-deb DATETIME=${DATETIME} | ||
make sharding-deb DATETIME=${DATETIME} | ||
|
||
cd build | ||
sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum | ||
|
||
set +x | ||
|
||
echo "Debian package built successfully as follows:" | ||
ls -l ghostferry* | ||
|
||
echo "sha256sum:" | ||
cat ghostferry-$GITHUB_SHA.sha256sum | ||
|
||
# Make sure the we didn't release a dirty build by accident | ||
if ls | grep -q dirty; then | ||
echo "ERROR: source directory is not clean! refused to release. showing git status below:" | ||
git status | ||
exit 1 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Documentation on github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
github-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build documentations | ||
run: .github/workflows/build-docs.sh | ||
|
||
|
||
- name: Deploy github pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/build/ghostferry-pages | ||
|
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,25 @@ | ||
name: Package and release on Github | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
|
||
- name: Building Ghostferry | ||
run: .github/workflows/build-deb.sh | ||
|
||
- name: Releasing Ghostferry to Github | ||
run: gh release create --target ${GITHUB_REF#refs/heads/} -p release-${GITHUB_SHA::8} build/ghostferry* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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