Skip to content

Commit

Permalink
feat: finish GitHub actions (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrotherSam66 authored Nov 8, 2022
1 parent df71f36 commit c4b9116
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 73 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Release:
# - Github release
# - binaries and tarballs
# - homebrew
name: "Release"

# Only a single job with this concurrency can run at any given time
# concurrency: release

on:
push:
branches:
- main
tags:
- "v*"

jobs:
release:
name: "Release"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18

# - name: Docker Login
# uses: docker/login-action@v1
# with:
# registry: docker.io
# username: ${{ secrets.DOCKER_USER }}
# password: ${{ secrets.DOCKER_PASS }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .github/workflows/rmkdocs_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: ci
on:
push:
branches:
- master
- main
- dev
jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
134 changes: 67 additions & 67 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,74 +57,74 @@ builds:
# - v2
# - v3

dockers:
# You can declare multiple Docker images.
# They will be matched against the binaries generated by your builds section
# and packages generated by your nfpms section.
# dockers:
# # You can declare multiple Docker images.
# # They will be matched against the binaries generated by your builds section
# # and packages generated by your nfpms section.

# Templates of the Docker image names.
# if prefix URL, docker img will push.
- image_templates:
- "docker.io/guancecloud/ppl:{{ .Version }}-amd64"
# - "gcr.io/guancecloud/ppl:{{ .Version }}-amd64"
# - "guancecloud/ppl:{{ .Version }}-amd64"

# GOOS of the built binaries/packages that should be used.
# goos: linux

# GOARCH of the built binaries/packages that should be used.
goarch: amd64

# GOAMD64 of the built binaries/packages that should be used.
# goamd64: 'v2'

# Skips the docker push.
# Could be useful if you also do draft releases.
# If set to auto, the release will not be pushed to the Docker repository
# in case there is an indicator of a prerelease in the tag, e.g. v1.0.0-rc1.
# Defaults to false.
skip_push: false

# Path to the Dockerfile (from the project root).
# Defaults to `Dockerfile`.
dockerfile: Dockerfile

# Set the "backend" for the Docker pipe.
# Valid options are: docker, buildx, podman.
# podman is a GoReleaser Pro feature and is only available on Linux.
# Defaults to docker.
use: docker

# Template of the docker build flags.
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/guancecloud/ppl
- --label=org.opencontainers.image.source=https://github.com/guancecloud/ppl
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT

- image_templates:
- "docker.io/guancecloud/ppl:{{ .Version }}-arm64v8"
# goos: linux
goarch: arm64
# goarm: 'v6'
skip_push: false
dockerfile: Dockerfile
use: docker
build_flag_templates:
- --platform=linux/arm64/v8
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/guancecloud/ppl
- --label=org.opencontainers.image.source=https://github.com/guancecloud/ppl
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
# # Templates of the Docker image names.
# # if prefix URL, docker img will push.
# - image_templates:
# - "docker.io/guancecloud/ppl:{{ .Version }}-amd64"
# # - "gcr.io/guancecloud/ppl:{{ .Version }}-amd64"
# # - "guancecloud/ppl:{{ .Version }}-amd64"

# # GOOS of the built binaries/packages that should be used.
# # goos: linux

# # GOARCH of the built binaries/packages that should be used.
# goarch: amd64

# # GOAMD64 of the built binaries/packages that should be used.
# # goamd64: 'v2'

# # Skips the docker push.
# # Could be useful if you also do draft releases.
# # If set to auto, the release will not be pushed to the Docker repository
# # in case there is an indicator of a prerelease in the tag, e.g. v1.0.0-rc1.
# # Defaults to false.
# skip_push: false

# # Path to the Dockerfile (from the project root).
# # Defaults to `Dockerfile`.
# dockerfile: Dockerfile

# # Set the "backend" for the Docker pipe.
# # Valid options are: docker, buildx, podman.
# # podman is a GoReleaser Pro feature and is only available on Linux.
# # Defaults to docker.
# use: docker

# # Template of the docker build flags.
# build_flag_templates:
# - --platform=linux/amd64
# - --label=org.opencontainers.image.title={{ .ProjectName }}
# - --label=org.opencontainers.image.description={{ .ProjectName }}
# - --label=org.opencontainers.image.url=https://github.com/guancecloud/ppl
# - --label=org.opencontainers.image.source=https://github.com/guancecloud/ppl
# - --label=org.opencontainers.image.version={{ .Version }}
# - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
# - --label=org.opencontainers.image.revision={{ .FullCommit }}
# - --label=org.opencontainers.image.licenses=MIT

# - image_templates:
# - "docker.io/guancecloud/ppl:{{ .Version }}-arm64v8"
# # goos: linux
# goarch: arm64
# # goarm: 'v6'
# skip_push: false
# dockerfile: Dockerfile
# use: docker
# build_flag_templates:
# - --platform=linux/arm64/v8
# - --label=org.opencontainers.image.title={{ .ProjectName }}
# - --label=org.opencontainers.image.description={{ .ProjectName }}
# - --label=org.opencontainers.image.url=https://github.com/guancecloud/ppl
# - --label=org.opencontainers.image.source=https://github.com/guancecloud/ppl
# - --label=org.opencontainers.image.version={{ .Version }}
# - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
# - --label=org.opencontainers.image.revision={{ .FullCommit }}
# - --label=org.opencontainers.image.licenses=MIT


# GoReleaser can be wired to nfpm to generate and publish .deb, .rpm and .apk packages.
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat&logo=github&color=2370ff&labelColor=454545)](http://makeapullrequest.com)
[![Go Report Card](https://goreportcard.com/badge/github.com/GuanceCloud/ppl)](https://goreportcard.com/report/github.com/GuanceCloud/ppl)
[![Downloads](https://img.shields.io/github/downloads/GuanceCloud/ppl/total.svg)](https://github.com/GuanceCloud/ppl/releases)
<<<<<<< HEAD
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6660/badge)](https://bestpractices.coreinfrastructure.org/projects/6660)
=======
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6202/badge)](https://bestpractices.coreinfrastructure.org/projects/6202)
>>>>>>> upstream/main

## What is PPL

Expand Down

0 comments on commit c4b9116

Please sign in to comment.