Skip to content

Commit

Permalink
Fix build CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
antonincms committed Aug 5, 2024
1 parent 2d8cd56 commit 26041c7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
push:
# Sequence of patterns matched against refs/heads
branches:
- develop
- master
- main
- fix-build-ci
tags:
- "*"

Expand All @@ -23,19 +23,31 @@ jobs:
with:
go-version-file: go.mod

# This step uses action-hub docker action: https://github.com/actions-hub/docker
- name: Login to docker hub
if: success()
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Build docker image
# Deduce the appropriate tag for the image
- name: Set env
run: |
if [[ -z "${IMAGE_TAG}" ]]; then \
IMAGE_TAG=${GITHUB_REF#*/}; \
IMAGE_TAG=${IMAGE_TAG#*/}; \
IMAGE_TAG=$(echo $IMAGE_TAG | sed -e "s#^v##"); \
if [[ "$IMAGE_TAG" == "master" || "$IMAGE_TAG" == "main" ]]; then \
IMAGE_TAG=latest; \
fi \
fi && \
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
# Build and push docker image
- name: Build docker image
if: success()
shell: bash
env:
IMG: quortexio/kubestitute:${IMAGE_TAG}
run: |
make docker-build docker-push
make docker-build
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module quortex.io/kubestitute

go 1.22.0

toolchain go1.22.5

require (
github.com/Masterminds/sprig/v3 v3.2.3
github.com/aws/aws-sdk-go v1.55.5
Expand Down

0 comments on commit 26041c7

Please sign in to comment.