Skip to content

Commit

Permalink
Merge pull request #184 from banzaicloud/move-to-gha
Browse files Browse the repository at this point in the history
Move circleci workflows to github actions
  • Loading branch information
ahma authored Sep 7, 2022
2 parents 0b717e0 + 6b389f6 commit 6a6f5b7
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 285 deletions.
282 changes: 0 additions & 282 deletions .circleci/config.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
pull_request:
push:
branches:
- master

env:
GOFLAGS: '-mod=readonly'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Checkout code
uses: actions/checkout@v2

- name: Run checks
env:
LINTER_FLAGS: '--timeout=2m'
run: make check-circle
14 changes: 11 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,18 @@ jobs:
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Determine tag or commit
uses: haya14busa/action-cond@v1
id: refortag
Expand All @@ -50,13 +56,15 @@ jobs:
env:
TAG_OR_BRANCH: ${{ steps.refortag.outputs.value }}
- name: Build thanos-operator
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
tags: ghcr.io/banzaicloud/thanos-operator:${{ steps.imagetag.outputs.value }}
file: Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
tags: |
ghcr.io/banzaicloud/thanos-operator:${{ steps.imagetag.outputs.value }}
banzaicloud/thanos-operator:${{ steps.imagetag.outputs.value }}
Loading

0 comments on commit 6a6f5b7

Please sign in to comment.