Skip to content

Commit bd987ab

Browse files
authored
Merge pull request #31 from wayofdev/feat/dist-folder-to-release
2 parents 1421046 + 73d96ba commit bd987ab

File tree

4 files changed

+58
-33
lines changed

4 files changed

+58
-33
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22

3-
name: CI
3+
name: 🔍 Continuous integration
44

55
on: # yamllint disable-line rule:truthy
66
push:
@@ -27,15 +27,18 @@ jobs:
2727
node_version: [ 'lts', '19', '18' ]
2828
os_name: [ 'alpine' ]
2929
steps:
30-
- uses: e1himself/[email protected]
30+
- name: 📦 Install goss
31+
uses: e1himself/[email protected]
3132

32-
- name: Checkout
33-
uses: actions/[email protected]
33+
- name: 📦 Check out the codebase
34+
uses: actions/checkout@v3
35+
with:
36+
fetch-depth: 0
3437

35-
- name: Generate dist files
38+
- name: 🤖 Generate dist files
3639
run: make generate
3740

38-
- name: Set Environment Variables
41+
- name: 🌎 Set environment variables
3942
env:
4043
IMAGE_NAMESPACE: wayofdev/node
4144
TEMPLATE: ${{ matrix.node_version }}-${{ matrix.os_name }}
@@ -45,7 +48,7 @@ jobs:
4548
echo "TEMPLATE=${TEMPLATE}" >> $GITHUB_ENV
4649
echo "VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV
4750
48-
- name: Docker Meta
51+
- name: 🐳 Define docker meta
4952
id: meta
5053
uses: docker/metadata-action@v4
5154
with:
@@ -59,35 +62,35 @@ jobs:
5962
latest=false
6063
prefix=${{ matrix.node_version }}-${{ matrix.os_name }}-
6164
62-
- name: Login to DockerHub
65+
- name: 🔑 Login to docker-hub
6366
if: github.event_name != 'pull_request'
6467
uses: docker/login-action@v2
6568
with:
6669
username: ${{ secrets.DOCKER_USERNAME }}
6770
password: ${{ secrets.DOCKER_TOKEN }}
6871

6972
### For Cross Platform OSX builds uncomment these lines
70-
- name: Set up QEMU
73+
- name: 🖥️ Set up QEMU
7174
uses: docker/setup-qemu-action@v2
7275
with:
7376
platforms: arm64
7477

75-
- name: Set up Docker BuildX
78+
- name: 🚀 Set up Docker BuildX
7679
uses: docker/setup-buildx-action@v2
7780
with:
7881
install: true
7982

80-
- name: Set tag for Docker Release Image
83+
- name: 🏷️ Set tag for docker release image
8184
if: success() && startsWith(github.ref, 'refs/tags/')
8285
run: |
8386
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-${{ env.VERSION }}" >> $GITHUB_ENV
8487
85-
- name: Set tag for Docker Master Image
88+
- name: 🏷️ Set tag for docker master image
8689
if: success() && ! startsWith(github.ref, 'refs/tags/')
8790
run: |
8891
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-latest" >> $GITHUB_ENV
8992
90-
- name: Build and Export to Docker
93+
- name: 🛠️ Build and export to docker
9194
uses: docker/build-push-action@v4
9295
with:
9396
context: ./dist/${{ env.TEMPLATE }}
@@ -97,11 +100,11 @@ jobs:
97100
cache-to: type=inline
98101
labels: ${{ steps.meta.outputs.labels }}
99102

100-
- name: Test Docker Image
103+
- name: 🧪 Test docker image
101104
run: |
102105
export IMAGE_TAG=${{ env.IMAGE_TAG }}; make test
103106
104-
- name: Push Docker Image
107+
- name: 📤 Push docker image
105108
uses: docker/build-push-action@v4
106109
with:
107110
context: ./dist/${{ env.TEMPLATE }}

.github/workflows/release-please.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
77
branches:
88
- master
99

10-
name: release-please
10+
name: 📦 Create release
1111

1212
jobs:
1313
release-please:
@@ -18,12 +18,6 @@ jobs:
1818
with:
1919
fetch-depth: 0
2020

21-
- name: 🚀 Generate dist files
22-
run: make generate
23-
24-
- name: 🗜️ Archive dist files
25-
run: tar -czvf dist.tar.gz dist
26-
2721
- name: 🎉 Create release
2822
uses: google-github-actions/release-please-action@v3
2923
id: release
@@ -48,10 +42,4 @@ jobs:
4842
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
4943
]
5044
51-
- name: 📤 Upload release assets
52-
uses: actions/upload-artifact@v3
53-
with:
54-
name: Dockerfiles
55-
path: dist.tar.gz
56-
5745
...

.github/workflows/shellcheck.yml

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

3-
name: Differential ShellCheck
4-
53
on: # yamllint disable-line rule:truthy
64
pull_request:
75

6+
name: 🐞 Differential shell-check
7+
88
permissions:
99
contents: read
1010

@@ -13,12 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Repository checkout
17-
uses: actions/checkout@v3.3.0
16+
- name: 📦 Check out the codebase
17+
uses: actions/checkout@v3
1818
with:
1919
fetch-depth: 0
2020

21-
- name: Differential ShellCheck
21+
- name: 🐞 Differential shell-check
2222
uses: redhat-plumbers-in-action/differential-shellcheck@v4
2323
with:
2424
severity: warning
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
3+
# https://github.com/google-github-actions/release-please-action#release-types-supported
4+
5+
on: # yamllint disable-line rule:truthy
6+
push:
7+
tags:
8+
- "v*.*.*"
9+
10+
name: 📤 Upload artifacts
11+
12+
jobs:
13+
upload-artifacts:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: 📦 Check out the codebase
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: 🚀 Generate dist files
22+
run: make generate
23+
24+
- name: 🗜️ Archive dist files
25+
run: tar -czvf dist.tar.gz dist
26+
27+
- name: 📤 Upload release assets
28+
uses: alexellis/[email protected]
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
asset_paths: '["./dist.tar.gz"]'
33+
34+
...

0 commit comments

Comments
 (0)