Skip to content

Commit 9ba7769

Browse files
committed
add github workflow
1 parent 4ff22f8 commit 9ba7769

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: ci
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
go-version: [ '1.20', '1.21.x' ]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup Go ${{ matrix.go-version }}
16+
uses: actions/setup-go@v4
17+
with:
18+
go-version: ${{ matrix.go-version }}
19+
- name: Install dependencies
20+
run: go get .
21+
- name: Build
22+
run: go build -v ./...
23+
- name: Test with the Go CLI
24+
run: go test

.github/workflows/release.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: release
2+
3+
on:
4+
create
5+
6+
jobs:
7+
docker:
8+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
-
12+
name: Set up QEMU
13+
uses: docker/setup-qemu-action@v3
14+
-
15+
name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
-
18+
name: Login to Docker Hub
19+
uses: docker/login-action@v3
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
-
24+
name: Build and push
25+
uses: docker/build-push-action@v5
26+
with:
27+
push: true
28+
tags: hakindazz/s6-cli:latest

0 commit comments

Comments
 (0)