Skip to content

Commit

Permalink
chore: fix manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
jirevwe committed Sep 2, 2024
1 parent 9354c24 commit 3ddf307
Showing 1 changed file with 18 additions and 54 deletions.
72 changes: 18 additions & 54 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ jobs:
run: go vet ./...

- name: Build app to make sure there are zero issues
run: go build -o convoy ./cmd
run: |
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=${{ matrix.platform }}
go build -o convoy ./cmd
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -97,56 +101,16 @@ jobs:
build-args: |
ARCH=${{ matrix.arch }}
build-and-push-default:
runs-on: ubuntu-latest
needs: [build_ui]
steps:
- uses: actions/checkout@v4

- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: dist-without-markdown
path: api/ui/build
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Check out code
uses: actions/checkout@v4

- name: Get and verify dependencies
run: go mod tidy && go mod download && go mod verify

- name: Go vet
run: go vet ./...

- name: Build app to make sure there are zero issues
run: go build -o convoy ./cmd

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_HUB_USERNAME }}
password: ${{ env.DOCKER_HUB_TOKEN }}

- name: Build and push default image
uses: docker/build-push-action@v2
with:
context: .
file: release.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}
${{ env.IMAGE_NAME }}:latest
- name: Create and push manifest for latest
run: |
docker manifest create ${{ env.IMAGE_NAME }}:latest \
${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}-amd64 \
${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}-arm64
docker manifest push user/repo:latest
- name: Create and push manifest for tag
run: |
docker manifest create ${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }} \
${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}-amd64 \
${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}-arm64
docker manifest push ${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}

0 comments on commit 3ddf307

Please sign in to comment.