Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #263 from negz/action
Browse files Browse the repository at this point in the history
Migrate tag and promote pipelines to actions
  • Loading branch information
wonderflow authored Oct 23, 2020
2 parents 5781e9d + 2f3729a commit b9fcf44
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 88 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@ on:
branches:
- master
- release-*
paths-ignore:
- '**.md'
- '**.png'
- '**.jpg'
pull_request:
paths-ignore:
- '**.md'
- '**.png'
- '**.jpg'
pull_request: {}
workflow_dispatch: {}

env:
# Common versions
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Promote

on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g. v0.1.0)'
required: true
channel:
description: 'Release channel'
required: true
default: 'alpha'

env:
# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run
# a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether
# credentials have been provided before trying to run steps that need them.
DOCKER_USR: ${{ secrets.DOCKER_USR }}
AWS_USR: ${{ secrets.AWS_USR }}

jobs:
promote-artifacts:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Fetch History
run: git fetch --prune --unshallow

- name: Promote Artifacts in S3 and Docker Hub
if: env.AWS_USR != '' && env.DOCKER_USR != ''
run: make -j2 promote BRANCH_NAME=${GITHUB_REF##*/}
env:
VERSION: ${{ github.event.inputs.version }}
CHANNEL: ${{ github.event.inputs.channel }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_USR }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PSW }}

27 changes: 27 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tag

on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g. v0.1.0)'
required: true

jobs:
create-tag:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Fetch History
run: git fetch --prune --unshallow

- name: Create Tag
run: make -j2 tag
env:
VERSION: ${{ github.event.inputs.version }}

37 changes: 0 additions & 37 deletions Jenkinsfile.promote

This file was deleted.

42 changes: 0 additions & 42 deletions Jenkinsfile.tag

This file was deleted.

0 comments on commit b9fcf44

Please sign in to comment.