Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions .circleci/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/actions/autotag/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG autotag_version=v1.3
FROM quay.io/pantheon-public/autotag:${autotag_version}

LABEL "com.github.actions.name"="autotag"
LABEL "com.github.actions.description"="Wraps https://github.com/pantheon-systems/autotag as a GitHub action"
LABEL "com.github.actions.icon"="tag"
LABEL "com.github.actions.color"="blue"

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
3 changes: 3 additions & 0 deletions .github/actions/autotag/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Autotag GitHub Action

This [GitHub Action](https://help.github.com/en/actions) wraps the [autotag](https://github.com/pantheon-systems/autotag) tool, to automatically find the next semver tag, and create it.
31 changes: 31 additions & 0 deletions .github/actions/autotag/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'autotag'
description: 'https://github.com/pantheon-systems/autotag'
inputs:
branch:
description: 'Git branch to scan'
required: false
default: 'master'
repo:
description: 'Path to the repo'
required: false
default: './'
pre_release_name:
description: 'create a pre-release tag with this name (can be: alpha|beta|pre|rc)'
required: false
default: ''
pre_release_timestamp:
description: 'create a pre-release tag and append a timestamp (can be: datetime|epoch)'
required: false
default: ''
dry_run:
description: 'Just output the next version, don''t autotag'
required: false
default: ''
outputs:
version:
description: 'The new version'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.who-to-greet }}
17 changes: 17 additions & 0 deletions .github/actions/autotag/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
set -eu

cd "${GITHUB_WORKSPACE}"

if [ -n "${INPUT_DRY_RUN}" ]; then
echo "Running in dry-run mode"
DRY_RUN="-n"
else
DRY_RUN=""
fi

version=$(/autotag --branch=${INPUT_BRANCH} --repo=${INPUT_REPO} --pre-release-name=${INPUT_PRE_RELEASE_NAME} --pre-release-timestamp=${INPUT_PRE_RELEASE_TIMESTAMP} ${DRY_RUN})

echo "version $version"

echo "::set-output name=version::$version"
36 changes: 36 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# GitHub Actions Workflow definition for validating Pull Requests

name: pr-validation

on: [pull_request]

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.15'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
args: release --snapshot --skip-publish --rm-dist

unit-tests:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.15'
- name: Run Unit Tests
run: go test -v ./...
env: {}
# GOFLAGS: -mod=vendor
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# GitHub Actions Workflow definition to automatically create a new release for each new Git tag

name: release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.15'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# GitHub Actions Workflow definition to automatically create a new Git tag on each push to master

name: tag

on:
push:
branches:
- master

jobs:
tag:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Tag
uses: ./.github/actions/autotag/
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}
tags: true
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
_scratch
tpl
vendor/
_dist/
dist/
bin/
helm3-unittest

helm-unittest
helm-unittest.exe
Expand Down Expand Up @@ -37,3 +39,5 @@ node_modules/

### MACOS ###
.DS_Store

helm-plugin.yaml
26 changes: 26 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Configuration file for http://goreleaser.com

before:
hooks:
- ./update_version.sh

builds:
- goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
- GO111MODULE=on
# - GOFLAGS=-mod=vendor

archives:
- files:
- README.md
- helm-plugin.yaml

changelog:
sort: asc
25 changes: 0 additions & 25 deletions CHANGELOG.md

This file was deleted.

15 changes: 0 additions & 15 deletions Dockerfile

This file was deleted.

56 changes: 0 additions & 56 deletions Makefile

This file was deleted.

Loading