Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54942ada28 | ||
|
|
cc1fbdc2b9 | ||
|
|
865440a0b0 | ||
|
|
300d243657 | ||
|
|
5be69cf38d | ||
|
|
1701c6cbe5 | ||
|
|
f1ca7d069c | ||
|
|
0ae522a43e | ||
|
|
3af4030d87 | ||
|
|
cc7ae5835f | ||
|
|
1307c185e0 | ||
|
|
dc016ceccc | ||
|
|
2cd59bd065 | ||
|
|
664b9f425d | ||
|
|
7dc37b1b74 | ||
|
|
6786f6753c | ||
|
|
3744500c5e | ||
|
|
866b1a165a |
17
.github/dependabot.yml
vendored
Normal file
17
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
# Maintain dependencies for go lang
|
||||
- package-ecosystem: "gomod"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
# Maintain dependencies for docker
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
14
.github/workflows/docker-image.yml
vendored
14
.github/workflows/docker-image.yml
vendored
@@ -1,18 +1,12 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag yosoy-local:$(date +%s)
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag yosoy-local:$(date +%s)
|
||||
|
||||
52
.github/workflows/docker-publish.yml
vendored
Normal file
52
.github/workflows/docker-publish.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
push_to_registries:
|
||||
name: Push Docker image to Docker Hub and ghcr.io registries
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: |
|
||||
lukasz/yosoy
|
||||
ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=edge
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
25
.github/workflows/go.yml
vendored
25
.github/workflows/go.yml
vendored
@@ -1,25 +1,20 @@
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.15
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.15.7-alpine3.13 as builder
|
||||
FROM golang:1.17.0-alpine3.13 as builder
|
||||
|
||||
LABEL maintainer="Łukasz Budnik lukasz.budnik@gmail.com"
|
||||
|
||||
@@ -6,7 +6,7 @@ LABEL maintainer="Łukasz Budnik lukasz.budnik@gmail.com"
|
||||
ADD . /go/yosoy
|
||||
RUN cd /go/yosoy && go build
|
||||
|
||||
FROM alpine:3.13
|
||||
FROM alpine:3.14.1
|
||||
COPY --from=builder /go/yosoy/yosoy /bin
|
||||
|
||||
# register entrypoint
|
||||
|
||||
Reference in New Issue
Block a user