Skip to content

Workflow file for this run

---
on: # yamllint disable-line rule:truthy
release:
types:
- released
name: 🚀 Build docker images with release 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 }}
version: ${{ steps.version.outputs.version }}
steps:
- name: ⚙️ Generate matrix
id: matrix
run: |
echo 'matrix={
"os_name": ["alpine"],
"node_version": ["lts", "16", "18", "20"]
}' | tr -d '\n' >> $GITHUB_OUTPUT
- name: ⚙️ Get version for image tag
id: version
run: |
version=${{ github.ref_name }}
version=${version#v}
echo "version=$version" >> $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: ${{ needs.prepare.outputs.version }}
secrets:
docker-username: ${{ secrets.DOCKER_USERNAME }}
docker-password: ${{ secrets.DOCKER_TOKEN }}
...