-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
106 additions
and
4 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,90 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- "{,v}*.*.*" | ||
|
||
env: | ||
AGENT_IMAGE: "neondatabase/autoscaler-agent" | ||
SCHED_IMAGE: "neondatabase/autoscale-scheduler" | ||
# pending merge of #8: | ||
# INFORMANT_IMAGE: "neondatabase/vm-informant" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v3 | ||
- name: get version and git info | ||
id: get_vcs_info | ||
run: | | ||
echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT | ||
echo -n "git_info=" >> $GITHUB_OUTPUT | ||
bash -c "set -eu -o pipefail; source ./scripts-common.sh; git_info" >> $GITHUB_OUTPUT | ||
- name: install golang | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
|
||
- name: docker - install qemu | ||
uses: docker/setup-qemu-action@v2 | ||
- name: docker - setup buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: login to docker hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }} | ||
|
||
- name: check everything builds | ||
run: go build ./... | ||
|
||
- name: build and push autoscale-scheduler image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
file: build/autoscale-scheduler/Dockerfile | ||
tags: ${{ env.SCHED_IMAGE }}:${{ steps.get_vcs_info.outputs.version }} | ||
build-args: | ||
- GIT_INFO=${{ setps.get_vcs_info.outputs.git_info }} | ||
- name: build and push autoscaler-agent image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
file: build/autoscaler-agent/Dockerfile | ||
tags: ${{ env.SCHED_IMAGE }}:${{ steps.get_vcs_info.outputs.version }} | ||
build-args: | ||
- GIT_INFO=${{ setps.get_vcs_info.outputs.git_info }} | ||
# pending merge of #8: | ||
# - name: build and push vm-informant image | ||
# uses: docker/build-push-action@v3 | ||
# with: | ||
# context: . | ||
# push: true | ||
# file: build/vm-informant/Dockerfile | ||
# tags: ${{ env.INFORMANT_IMAGE }}:${{ steps.get_vcs_info.outputs.version }} | ||
# build-args: | ||
# - GIT_INFO=${{ setps.get_vcs_info.outputs.git_info }} | ||
# | ||
# # Because we want a docker image for the VM informant, the easiest way for us to also provide | ||
# # a binary is by just extracting it from the container image itself. | ||
# - name: extract vm-informant binary | ||
# run: | | ||
# mkdir bin | ||
# # todo: do we actually need to pull here if we're pushing above? | ||
# docker pull --quiet ${{ env.INFORMANT_IMAGE }}:${{ steps.get_vcs_info.outputs.version }} | ||
# ID=$(docker create ${{ env.INFORMANT_IMAGE }}:${{ steps.get_vcs_info.outputs.version }} | ||
# docker cp $ID:/usr/bin/vm-informant bin/vm-informant | ||
# docker rm -f $ID | ||
|
||
- name: github release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
bin/vm-informant | ||
deploy/autoscaler-agent.yaml | ||
deploy/autsocale-scheduler.yaml |
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
File renamed without changes.
File renamed without changes.
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