Skip to content

Commit 6bf8ebf

Browse files
committed
feat: updating workflow
1 parent 00a9105 commit 6bf8ebf

File tree

6 files changed

+46
-15
lines changed

6 files changed

+46
-15
lines changed

.github/labeler.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# this file is for the labeler workflow job
2+
# Documentation https://github.com/marketplace/actions/labeler
3+
4+
"type: documentation":
5+
- assets/**/*
6+
- .github/*
7+
- ./*.md
8+
9+
"type: maintenance":
10+
- .dependabot/*
11+
- .github/workflows/*
12+
- src/**/goss.yaml.j2

.github/workflows/auto-merge-release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
pull-request-number: ${{ github.event.pull_request.number }}
2323
merge-method: merge
24+
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
2425
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
2526

2627
...

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22

3-
name: 🔍 Continuous integration
4-
53
on: # yamllint disable-line rule:truthy
64
push:
75
branches:
@@ -18,9 +16,10 @@ on: # yamllint disable-line rule:truthy
1816
# Every Sunday at 01:10
1917
- cron: '10 1 * * 0'
2018

19+
name: 🔍 Continuous integration
20+
2121
jobs:
2222
build:
23-
name: 🧪 Testing on Node ${{ matrix.node_version }} - ${{ matrix.os_name }}
2423
runs-on: ubuntu-latest
2524
strategy:
2625
fail-fast: false
@@ -44,10 +43,12 @@ jobs:
4443
IMAGE_NAMESPACE: wayofdev/node
4544
TEMPLATE: ${{ matrix.node_version }}-${{ matrix.os_name }}
4645
run: |
47-
export RELEASE_VERSION=${GITHUB_REF#refs/*/}
48-
echo "IMAGE_NAMESPACE=${IMAGE_NAMESPACE}" >> $GITHUB_ENV
49-
echo "TEMPLATE=${TEMPLATE}" >> $GITHUB_ENV
50-
echo "VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV
46+
export RELEASE_VERSION="${GITHUB_REF#refs/*/}" \
47+
&& { \
48+
echo "IMAGE_NAMESPACE=${IMAGE_NAMESPACE}"; \
49+
echo "TEMPLATE=${TEMPLATE}"; \
50+
echo "VERSION=${RELEASE_VERSION:1}"; \
51+
} >> "$GITHUB_ENV"
5152
5253
- name: 🐳 Define docker meta
5354
id: meta
@@ -84,12 +85,12 @@ jobs:
8485
- name: 🏷️ Set tag for docker release image
8586
if: success() && startsWith(github.ref, 'refs/tags/')
8687
run: |
87-
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-${{ env.VERSION }}" >> $GITHUB_ENV
88+
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-${{ env.VERSION }}" >> "$GITHUB_ENV"
8889
8990
- name: 🏷️ Set tag for docker master image
9091
if: success() && ! startsWith(github.ref, 'refs/tags/')
9192
run: |
92-
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-latest" >> $GITHUB_ENV
93+
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-latest" >> "$GITHUB_ENV"
9394
9495
- name: 🛠️ Build and export to docker
9596
uses: docker/build-push-action@v4

.github/workflows/create-release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ jobs:
1313
release:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: 📦 Check out the codebase
17-
uses: actions/checkout@v3
18-
with:
19-
fetch-depth: 0
20-
2116
- name: 🎉 Create release
2217
uses: google-github-actions/release-please-action@v3
2318
id: release

.github/workflows/label.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler/blob/master/README.md
7+
8+
on: # yamllint disable-line rule:truthy
9+
pull_request:
10+
11+
name: 🏷️ Add labels
12+
13+
jobs:
14+
label:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 🏷️ Apply labels
18+
uses: actions/labeler@v4
19+
with:
20+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
21+
22+
...

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ help: ## Show this menu
5959
# Default action
6060
# Defines default command when `make` is executed without additional parameters
6161
# ------------------------------------------------------------------------------------
62-
all: build hooks
62+
all: hooks build
6363
.PHONY: all
6464

6565

0 commit comments

Comments
 (0)