Skip to content

Commit

Permalink
Work on github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin P. Jung committed Sep 8, 2020
1 parent ccfca93 commit cf1fe4c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Release

on:
push:
tags:
- 'v*.*.*'

jobs:
create_github_release:
name: Create Github Release
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Determine Version
id: determine_version
shell: bash
run: |
echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{steps.determine_version.outputs.version}}
path: ./CHANGELOG.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{steps.version.outputs.prop}}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
16 changes: 13 additions & 3 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,25 @@ on:
branches:
- master
jobs:
build:
validate:
name: Validate Terraform Module
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
container:
image: docker.io/hashicorp/terraform:0.12.24
image: docker.io/hashicorp/terraform:0.13.2
steps:
- name: git checkout
uses: actions/checkout@v2
- name: Initialize Terraform
run: terraform init -backend=false
- name: Validate Terraform Module Syntax
run: terraform validate
#security_scanner:
# name: Run tfsec Security Scanner
# runs-on: ubuntu-20.04
# container:
# image: docker.io/liamg/tfsec:v0.25.0
# steps:
# - name: git checkout
# uses: actions/checkout@v2
# - name: Run security scanner
# run: tfsec .

0 comments on commit cf1fe4c

Please sign in to comment.