Skip to content

Commit

Permalink
Put push action to separate workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHeinz committed Dec 28, 2019
1 parent 2a9e087 commit c994ba6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/main.yml → .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Build and Test

on: [push]

Expand All @@ -23,13 +23,4 @@ jobs:
pip install -r requirements.txt
- name: Run Makefile test
run: make test


push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Log into Registry
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Push to GitHub Package Registry
run: make push VERSION=0.0.3

18 changes: 18 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Push

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

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set env
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
- name: Log into Registry
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Push to GitHub Package Registry
run: make push VERSION=${{ env.RELEASE_VERSION }}

0 comments on commit c994ba6

Please sign in to comment.