generated from wayofdev/docker-tpl
-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.13 KB
/
build-latest.yml
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
---
on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
branches:
- master
name: 🚀 Build docker images with latest tag
jobs:
# https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/expressions#example-returning-a-json-object
prepare:
runs-on: "ubuntu-latest"
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: ⚙️ Generate matrix
id: matrix
run: |
echo 'matrix={
"os_name": ["alpine"],
"node_version": ["lts", "18", "20"]
}' | tr -d '\n' >> $GITHUB_OUTPUT
build:
needs: prepare
strategy:
matrix: ${{ fromJson(needs.prepare.outputs.matrix )}}
uses: wayofdev/gh-actions/.github/workflows/build-image.yml@master
with:
os: "ubuntu-latest"
push-to-hub: true
image-namespace: "wayofdev/node"
image-template-path: "./dist"
image-template: ${{ matrix.node_version }}-${{ matrix.os_name }}
image-version: latest
secrets:
docker-username: ${{ secrets.DOCKER_USERNAME }}
docker-password: ${{ secrets.DOCKER_TOKEN }}
...