Skip to content

Commit

Permalink
Setup GH actions for test & release
Browse files Browse the repository at this point in the history
  • Loading branch information
patrislav committed Mar 28, 2024
1 parent 14ca4c0 commit 6ca992e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release tag

on:
push:
tags:
- "*"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log into Github registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Docker build
run: |
docker build --build-arg VERSION=${GITHUB_REF##*/} -t ghcr.io/0xsequence/prometheus-to-cloudwatch:${GITHUB_REF##*/} -t ghcr.io/0xsequence/prometheus-to-cloudwatch:latest .
docker push ghcr.io/0xsequence/prometheus-to-cloudwatch:${GITHUB_REF##*/}
docker push ghcr.io/0xsequence/prometheus-to-cloudwatch:latest
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21.x' ]

steps:
- uses: actions/checkout@v3

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Vet
run: go vet

0 comments on commit 6ca992e

Please sign in to comment.