Skip to content

Commit

Permalink
Create make-release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
zivnevo authored Aug 30, 2021
1 parent e92a4cf commit 7a388fb
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/make-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Create docker release and github release

on:
workflow_dispatch:
inputs:
version:
description: 'Release version number'
required: true

jobs:
push_to_registry:
name: Push a Docker image to the Docker Hub and create a github release
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/shift-left-netconfig/netpol-synth:${{ github.event.inputs.version }}

- name: Create and push a new git tag
run: |
git config user.name ${{ github.actor }}
git tag -a v${{ github.event.inputs.version }} -m "Version ${{ github.event.inputs.version }}"
git push origin v${{ github.event.inputs.version }}
- name: Create a github release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: Release v${{ github.event.inputs.version }}
body: |
Changes in this Release:
draft: false
prerelease: false

0 comments on commit 7a388fb

Please sign in to comment.