Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: replace CircleCI by Github Actions #44

Merged
merged 5 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 0 additions & 178 deletions .circleci/config.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Build
on:
pull_request:
branches:
- main

jobs:
golang:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v5
with:
go-version: '^1.22.2'
- run: make promu
- run: promu crossbuild -v
- name: Store binaries
uses: actions/upload-artifact@v4
with:
name: build
path: .build

docker:
needs: golang
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Download binaries artifacts
uses: actions/download-artifact@v4
with:
name: build
path: .build
- run: make docker
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Publish
on:
push:
branches:
- main
release:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v5
with:
go-version: '^1.22.2'
- run: make promu
- run: promu crossbuild -v
- name: Store binaries artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: .build

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Download binaries artifacts
uses: actions/download-artifact@v4
with:
name: build
path: .build
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: make docker DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- run: make docker-publish DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- run: make docker-manifest DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- if: startsWith(github.ref, 'refs/tags/v')
run: |
make docker-tag-latest DOCKER_IMAGE_TAG="${{ github.ref_name }}"
make docker-publish DOCKER_IMAGE_TAG="latest"
make docker-manifest DOCKER_IMAGE_TAG="latest"
18 changes: 0 additions & 18 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ crossbuild:
- linux/amd64
- linux/386
- darwin/amd64
- darwin/386
- darwin/arm64
- windows/amd64
- windows/386
- freebsd/amd64
- freebsd/386
- openbsd/amd64
- openbsd/386
- netbsd/amd64
- netbsd/386
- dragonfly/amd64
- linux/arm
- linux/arm64
- freebsd/arm
- openbsd/arm
- netbsd/arm
- linux/ppc64
- linux/ppc64le
- linux/mips64
- linux/mips64le
- linux/s390x