Skip to content

Commit

Permalink
add release and pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
abelanger5 committed Oct 3, 2024
1 parent 32aa190 commit ef10d05
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -494,3 +494,98 @@ jobs:
ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 \
ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64
docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}
build-push-hatchet-dashboard-amd:
name: hatchet-dashboard-amd
runs-on: ubuntu-latest
steps:
- name: Get tag name
id: tag_name
run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT
env:
GITHUB_TAG: ${{ github.ref }}
- name: Checkout
uses: actions/checkout@v4
- name: Login to GHCR
id: login-ghcr
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
--build-arg SERVER_TARGET=api \
--platform linux/amd64 \
-t hatchet-api-tmp:amd64 \
.
DOCKER_BUILDKIT=1 docker build -f ./build/package/dashboard.dockerfile \
-t ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64 \
--platform linux/amd64 \
--build-arg HATCHET_API_IMAGE=hatchet-api-tmp:amd64 \
.
- name: Push to GHCR
run: |
docker push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64
build-push-hatchet-dashboard-arm:
name: hatchet-dashboard-arm
runs-on: hatchet-arm64-2
steps:
- name: Get tag name
id: tag_name
run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT
env:
GITHUB_TAG: ${{ github.ref }}
- name: Checkout
uses: actions/checkout@v4
- name: Login to GHCR
id: login-ghcr
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
--build-arg SERVER_TARGET=api \
--platform linux/arm64 \
-t hatchet-api-tmp:arm64 \
.
DOCKER_BUILDKIT=1 docker build -f ./build/package/dashboard.dockerfile \
-t ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64 \
--platform linux/arm64 \
--build-arg HATCHET_API_IMAGE=hatchet-api-tmp:arm64 \
.
- name: Push to GHCR
run: |
docker push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64
combine-hatchet-dashboard:
name: Combine hatchet-dashboard
runs-on: ubuntu-latest
needs:
- build-push-hatchet-dashboard-amd
- build-push-hatchet-dashboard-arm
steps:
- name: Get tag name
id: tag_name
run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT
env:
GITHUB_TAG: ${{ github.ref }}
- name: Checkout
uses: actions/checkout@v4
- name: Login to GHCR
id: login-ghcr
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Pull amd64
run: docker pull ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64
- name: Pull arm64
run: docker pull ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64
- name: Combine
run: |
docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}} \
ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64 \
ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64
docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}
10 changes: 10 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,13 @@ jobs:
ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64
docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest
- name: Pull and push hatchet-dashboard
run: |
docker pull ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64
docker pull ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64
docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:latest \
ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64 \
ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64
docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:latest

0 comments on commit ef10d05

Please sign in to comment.