-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduced GitHub workflow, removed Buildkite script
- Loading branch information
1 parent
2dc8b92
commit ce061b3
Showing
2 changed files
with
66 additions
and
72 deletions.
There are no files selected for viewing
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,66 @@ | ||
name: "Build the images and push them from main" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 3 | ||
matrix: | ||
target: | ||
# - { directory: rhel, label: ":linux: Glibc build images" } | ||
# - { directory: musl, label: ":linux: Musl (dynamic) build images" } | ||
- { directory: linux-static, label: ":linux: Musl (static) build images" } | ||
# - { directory: cross, label: ":rust::darwin::windows: Cross compilation images" } | ||
# - { directory: test, label: ":rust: Test image" } | ||
# - { directory: release, label: ":rust: Release image" } | ||
# - { directory: sql_server, label: ":mssql: SQL Server images" } | ||
# - { directory: mongo, label: ":mongodb: Mongo single-replica images" } | ||
# - { directory: cockroach, label: ":cockroach: CockroachDB custom images" } | ||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Build ${{matrix.target.label}}" | ||
env: | ||
DOCKER_HUB_TOKEN: ${{secrets.DOCKER_HUB_TOKEN}} | ||
run: | | ||
echo "Building ${{matrix.target.label}}" | ||
cd "${{matrix.target.directory}}" | ||
make build | ||
push: | ||
if: github.ref == 'refs/heads/main' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 3 | ||
matrix: | ||
target: | ||
# - { directory: rhel, label: ":linux: Glibc build images" } | ||
# - { directory: musl, label: ":linux: Musl (dynamic) build images" } | ||
- { directory: linux-static, label: ":linux: Musl (static) build images" } | ||
# - { directory: cross, label: ":rust::darwin::windows: Cross compilation images" } | ||
# - { directory: test, label: ":rust: Test image" } | ||
# - { directory: release, label: ":rust: Release image" } | ||
# - { directory: sql_server, label: ":mssql: SQL Server images" } | ||
# - { directory: mongo, label: ":mongodb: Mongo single-replica images" } | ||
# - { directory: cockroach, label: ":cockroach: CockroachDB custom images" } | ||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Build and push ${{matrix.target.label}}" | ||
env: | ||
DOCKER_HUB_TOKEN: ${{secrets.DOCKER_HUB_TOKEN}} | ||
run: | | ||
echo "Building and pushing ${{matrix.target.label}}" | ||
cd "${{matrix.target.directory}}" | ||
make build | ||
echo "$DOCKER_HUB_TOKEN" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin | ||
make push |