New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross compile from GitHub actions #1
base: master
Are you sure you want to change the base?
Changes from all commits
c185f83
3526050
d34a87e
14a610f
21f1105
1bfe50d
37c5fb9
489fc93
ba9a9a4
436b661
246f87d
872d401
ca92a90
8856bc7
88d25f8
7fd0d32
57cbdbd
3c07e3f
27fd24e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
name: daily release | ||
on: | ||
schedule: | ||
# Runs at 0:00 and 12:00 UTC every day | ||
- cron: '0 */12 * * *' | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
pull_request: | ||
|
||
jobs: | ||
docker: | ||
|
@@ -41,15 +43,24 @@ jobs: | |
make unit-test | ||
working-directory: ./src/github.com/${{ github.repository }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
registry: ghcr.io | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is also temporary |
||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Daily Release | ||
run: make TAG=latest RELEASE_VER=latest DOCKER_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} DOCKER_PASSWORD=${{ secrets.DOCKERHUB_TOKEN }} CC=/usr/local/musl/bin/musl-gcc release | ||
run: make DOCKER_PLATFORMS="linux/amd64,linux/arm64" BUILDX_OUTPUT_TYPE=registry IMAGE_PREFIX=ghcr.io/martin-g/volcano-from-gha TAG=latest RELEASE_VER=latest CC=/usr/local/musl/bin/musl-gcc release | ||
working-directory: ./src/github.com/${{ github.repository }} | ||
|
||
- name: Loginout DockerHub | ||
- name: Logout DockerHub | ||
run: docker logout |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ set -o pipefail | |
# 7. generate zip file | ||
|
||
VK_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.. | ||
BINARY_FOLDER=${VK_ROOT}/${BIN_DIR}/${REL_OSARCH} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. REL_OSARCH is always |
||
BINARY_FOLDER=${VK_ROOT}/${BIN_DIR} | ||
RELEASE_FOLDER=${VK_ROOT}/${RELEASE_DIR} | ||
RELEASE_BINARY=${RELEASE_FOLDER}/bin | ||
README_FILE=${VK_ROOT}/installer/README.md | ||
|
@@ -44,7 +44,7 @@ if [[ ! -d ${RELEASE_BINARY} ]];then | |
mkdir ${RELEASE_BINARY} | ||
fi | ||
|
||
cp -r ${BINARY_FOLDER} ${RELEASE_BINARY} | ||
cp -r ${BINARY_FOLDER}/* ${RELEASE_BINARY} | ||
|
||
cp ${README_FILE} ${RELEASE_FOLDER} | ||
|
||
|
@@ -57,11 +57,9 @@ fi | |
# overwrite the tag name into values yaml | ||
sed -i "s/latest/${VOLCANO_IMAGE_TAG}/g" ${RELEASE_FOLDER}/helm/chart/volcano/values.yaml | ||
|
||
if [[ "${DOCKER_USERNAME}xxx" == "xxx" ]];then | ||
if [[ "${DOCKER_PASSWORD}xxx" == "xxx" ]];then | ||
echo "docker username or password not found, quit uploading images" | ||
exit 0 | ||
fi | ||
if [ "${DOCKER_USERNAME}xxx" == "xxx" ] || [ "${DOCKER_PASSWORD}xxx" == "xxx" ];then | ||
echo "docker username or password not found, quit uploading images" | ||
exit 0 | ||
fi | ||
|
||
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,12 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM golang:1.17.7 AS builder | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated the version to 1.17.x because of some issues with reflection. See 1bfe50d |
||
WORKDIR /go/src/volcano.sh/ | ||
ADD . volcano | ||
RUN cd volcano && make vc-controller-manager | ||
|
||
FROM alpine:latest | ||
|
||
ADD vc-controller-manager /vc-controller-manager | ||
COPY --from=builder /go/src/volcano.sh/volcano/_output/bin/vc-controller-manager /vc-controller-manager | ||
ENTRYPOINT ["/vc-controller-manager"] |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is temporary change to be able to test the workflow