Skip to content

Commit

Permalink
Move to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nickschuch committed Oct 30, 2024
1 parent 55fda39 commit e958db6
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 54 deletions.
54 changes: 0 additions & 54 deletions .circleci/config.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on:
push

jobs:
lint:
name: 📋 Lint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Git clone the repository
uses: actions/checkout@v3

- name: 📦 Install Go
uses: actions/setup-go@v3
with:
go-version: '1.22'

- name: 🧪 Revive
run: |
go install github.com/mgechev/revive@latest
make lint
45 changes: 45 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release Github Package

on:
push:
branches:
- 'main'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/make -f

lint:
revive -set_exit_status -exclude=./vendor/... ./...

.PHONY: *

0 comments on commit e958db6

Please sign in to comment.