Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zero88 committed Apr 5, 2021
1 parent cf9b573 commit b8b69ba
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 7 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

[*.{json, yml, yaml, md, js, ts}]
indent_size = 2

[*.{bat, ps1}]
end_of_line = crlf
7 changes: 1 addition & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
name: docker
name: docker-cache

on:
# push:
# branches:
# - main
workflow_dispatch:
inputs:
type:
description: 'Type'
required: true
default: javascript

jobs:
hello_world_job:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/p1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: build-vpnclient

on:
pull_request:
types: [ opened, synchronize, reopened, closed ]
branches: [ main, master ]
paths:
- '.github/workflows/p1.yml'
- 'p1/**'
push:
branches: [ main, master ]
tags:
- 'p1/v*'
paths:
- '.github/workflows/p1.yml'
- 'p1/**'

jobs:

context:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.OSS_GITHUB_TOKEN }}

- name: Project context
id: context
uses: zero88/gh-project-context@v1
with:
dry: false
defaultBranch: master
tagPrefix: p1/v
releaseBranchPrefix: release/p1/
mergedReleaseMsgRegex: "^Merge pull request #[0-9]+ from .+/release/p1/.+$"
patterns: |
p1/version.py::(VERSION\s?=\s?)(')([^']+)(')::2
- name: Docker context
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: zero88/p1
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
type=match,pattern=p1\/v(.*),group=1
- name: Print
run: |
echo "${{ steps.docker_meta.outputs.tags }}"
echo "${{ steps.docker_meta.outputs.labels }}"
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: First run
name: GH-context

on:
push:
branches:
- main
tags:
- v*
paths-ignore:
- 'p1/**'
- '.github/workflows/p1.yml'
pull_request:
types: [ opened, synchronize, reopened, closed ]
branches:
- 'main'
paths-ignore:
- 'p1/**'
- '.github/workflows/p1.yml'
workflow_dispatch:

jobs:
Expand Down
1 change: 1 addition & 0 deletions p1/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = '1.0.0'

0 comments on commit b8b69ba

Please sign in to comment.