-
Notifications
You must be signed in to change notification settings - Fork 10
74 lines (73 loc) · 2.78 KB
/
release-manual.yml
File metadata and controls
74 lines (73 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Manual -- Version, Release & Build
on:
workflow_dispatch:
inputs:
body:
description: "Release Notes"
required: false
type: string
type:
description: "Release Type"
type: choice
required: true
default: "minor"
options:
- major
- minor
- patch
jobs:
bump-package-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: bump_version
uses: KageKirin/bump-node-package-version@v0
with:
major: ${{ github.event.inputs.type == 'major'}}
minor: ${{ github.event.inputs.type == 'minor'}}
patch: ${{ github.event.inputs.type == 'patch'}}
- id: commit_version
uses: EndBug/add-and-commit@v7
with:
branch: master
message: "Bump package version"
# Hotfix 'fatal: not in a git directory' see https://github.com/rickstaa/action-create-tag/issues/10
- name: "Change perms on GITHUB_WORKSPACE"
run: |
sudo chown -R root:root $GITHUB_WORKSPACE
sudo chmod -R 0777 $GITHUB_WORKSPACE
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.bump_version.outputs.version }}
commit_sha: ${{ steps.commit_version.outputs.commit_sha }}
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.bump_version.outputs.version }}
body: ${{ github.event.inputs.body }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"
- name: Get simple tag name
id: tag
run: echo "::set-output name=tag::$(basename ${{ steps.bump_version.outputs.version }})"
- name: Check out the ab-production-image repo
uses: actions/checkout@v2
with:
repository: appdevdesigns/ab-production-image
path: ab-production-image
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./ab-production-image
push: true
tags: |
digiserve/ab-sails-api:${{ steps.tag.outputs.tag }}
digiserve/ab-sails-api:latest
# digiserve/ab-sails-api:${{ steps.date.outputs.date }}
build-args: AB_GITHUB_COMMIT=${{ steps.commit_version.outputs.commit_sha }}