Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Build
on:
workflow_call:
inputs:
docker_image:
container_image:
required: true
type: string
ref:
Expand All @@ -23,11 +23,11 @@ permissions:
packages: write

jobs:
build-source:
source:
name: "Build Source [${{ matrix.distro }}]"
runs-on: ubuntu-latest
container:
image: ${{ inputs.docker_image }}/dev-${{ matrix.image_name }}:${{ inputs.ref }}
image: ${{ inputs.container_image }}-dev-${{ matrix.image_name }}:${{ inputs.ref }}

@leonardocarreras leonardocarreras Jul 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image: ${{ inputs.container_image }}**/**dev-${{ matrix.image_name }}:${{ inputs.ref }} ? prepare creates it with / not - so the image will not be found

options: --user root
strategy:
fail-fast: false
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
runs-on: ubuntu-latest
environment: ${{ github.event_name == 'pull_request_target' && 'fork-pr' || 'internal' }}
outputs:
docker_image: ${{ steps.image.outputs.docker_image }}
container_image: ${{ steps.image.outputs.container_image }}
ref: ${{ steps.ref.outputs.ref }}
ref_name: ${{ steps.ref.outputs.ref_name }}
steps:
- name: Compute image name for the current repository
id: image
env:
OWNER: ${{ github.repository_owner }}
run: echo "docker_image=ghcr.io/${OWNER,,}/villas/node" >> "$GITHUB_OUTPUT"
REPOSITORY: ${{ github.repository }}
run: echo "container_image=ghcr.io/${REPOSITORY,,}" >> "$GITHUB_OUTPUT"

# Under pull_request_target GITHUB_SHA and GITHUB_REF_NAME point at the base branch.
- name: Resolve the revision under test
Expand Down Expand Up @@ -73,12 +73,12 @@ jobs:
ref: ${{ needs.setup.outputs.ref }}

prepare:
name: Prepare Docker Images
name: Prepare Container Images
needs: [setup]
secrets: inherit
uses: ./.github/workflows/prepare.yaml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
container_image: ${{ needs.setup.outputs.container_image }}
ref: ${{ needs.setup.outputs.ref }}
ref_name: ${{ needs.setup.outputs.ref_name }}

Expand All @@ -88,7 +88,7 @@ jobs:
secrets: inherit
uses: ./.github/workflows/build.yaml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
container_image: ${{ needs.setup.outputs.container_image }}
ref: ${{ needs.setup.outputs.ref }}

test:
Expand All @@ -97,16 +97,16 @@ jobs:
secrets: inherit
uses: ./.github/workflows/test.yaml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
container_image: ${{ needs.setup.outputs.container_image }}
ref: ${{ needs.setup.outputs.ref }}

packaging-docker:
name: Build Docker Images
packaging-container:
name: Build Container Images
needs: [setup, test, prepare]
secrets: inherit
uses: ./.github/workflows/packaging-docker.yaml
uses: ./.github/workflows/packaging-container.yaml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
container_image: ${{ needs.setup.outputs.container_image }}
ref: ${{ needs.setup.outputs.ref }}
ref_name: ${{ needs.setup.outputs.ref_name }}

Expand All @@ -116,17 +116,17 @@ jobs:
secrets: inherit
uses: ./.github/workflows/packaging-nix.yaml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
container_image: ${{ needs.setup.outputs.container_image }}
ref: ${{ needs.setup.outputs.ref }}
ref_name: ${{ needs.setup.outputs.ref_name }}

deploy:
name: Deploy Docker Images
needs: [setup, packaging-docker]
name: Deploy Container Images
needs: [setup, packaging-container]
secrets: inherit
uses: ./.github/workflows/deploy.yaml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
container_image: ${{ needs.setup.outputs.container_image }}
ref: ${{ needs.setup.outputs.ref }}
ref_name: ${{ needs.setup.outputs.ref_name }}
is_version_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
Expand All @@ -137,7 +137,7 @@ jobs:
secrets: inherit
uses: ./.github/workflows/deploy-nix.yaml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
container_image: ${{ needs.setup.outputs.container_image }}
ref_name: ${{ needs.setup.outputs.ref_name }}
is_version_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}

Expand All @@ -160,7 +160,7 @@ jobs:
- prepare
- build
- test
- packaging-docker
- packaging-container
- packaging-nix
- deploy
- deploy-nix
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
packages: write

jobs:
cleanup-packages:
packages:
name: Packages
runs-on: ubuntu-latest
steps:
Expand All @@ -22,9 +22,9 @@ jobs:
- name: Cleanup GHCR Packages
uses: dataaxiom/ghcr-cleanup-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ github.token }}
owner: ${{ github.repository_owner }}
packages: ^villas/node(/.*)?$
packages: ^villasframework/node(/.*)?$

@leonardocarreras leonardocarreras Jul 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without the villasframework/ part, I think

expand-packages: true
use-regex: true
exclude-tags: ^(latest|master.*|v.*)$
Expand Down
36 changes: 16 additions & 20 deletions .github/workflows/deploy-nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ name: Deploy (Nix)
on:
workflow_call:
inputs:
docker_image:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

container_image ?

required: true
type: string
ref_name:
required: true
type: string
Expand All @@ -18,16 +15,15 @@ on:
default: false

env:
REGISTRY: ghcr.io
DOCKER_IMAGE: ${{ inputs.docker_image }}
CONTAINER_IMAGE: ghcr.io/villasframework/node

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONTAINER_IMAGE: ${{ inputs.container_image }} ? hardcoding breaks the forks

additionally, now there are two patterns, because others drop and use directly inputs.container_image


permissions:
contents: read
packages: write

jobs:
deploy-docker-nix:
name: Nix-based Docker Images
container-nix:
name: Nix-based Container Images
runs-on: ubuntu-latest
steps:
- name: Build Image
Expand All @@ -36,9 +32,9 @@ jobs:
- name: Login to Registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ github.token }}

- name: Compute safe ref Tag
id: ref
Expand All @@ -49,14 +45,14 @@ jobs:
- name: Create and Push Multi-arch Nix Manifest
run: |
docker buildx imagetools create \
-t "${{ env.DOCKER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix" \
"${{ env.DOCKER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix-x86_64-linux" \
"${{ env.DOCKER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix-aarch64-linux"
-t "${{ env.CONTAINER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix" \
"${{ env.CONTAINER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix-x86_64-linux" \
"${{ env.CONTAINER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix-aarch64-linux"

latest-docker-nix:
name: Tag Nix-based Docker Images as latest-nix
latest-container-nix:
name: Tag Nix-based Container Images as latest-nix
if: ${{ inputs.is_version_tag }}
needs: [deploy-docker-nix]
needs: [container-nix]
runs-on: ubuntu-latest
steps:
- name: Build Image
Expand All @@ -65,9 +61,9 @@ jobs:
- name: Login to Registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ github.token }}

- name: Compute safe ref Tag
id: ref
Expand All @@ -78,8 +74,8 @@ jobs:
- name: Tag Nix Manifest as latest-nix
run: |
docker buildx imagetools create \
-t "${{ env.DOCKER_IMAGE }}:latest-nix" \
"${{ env.DOCKER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix"
-t "${{ env.CONTAINER_IMAGE }}:latest-nix" \
"${{ env.CONTAINER_IMAGE }}:${{ steps.ref.outputs.tag }}-nix"

release-nix:
name: Release Nix
Expand All @@ -98,7 +94,7 @@ jobs:

- name: Publish ARX and RPM Bundles to the Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${GITHUB_REF_NAME}" dist/* \
--repo "${GITHUB_REPOSITORY}" \
Expand Down
Loading