Skip to content
Merged
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
67 changes: 67 additions & 0 deletions .github/workflows/test-pr-arm64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "PR - Test Updated Features (arm64)"
on:
pull_request:
# NOTE: To extend this workflow to other features, add path entries below
# following the same pattern, e.g.:
# - "src/<feature-name>/**"
# - "test/<feature-name>/**"
paths:
- "src/powershell/**"
- "test/powershell/**"

jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
features: ${{ steps.filter.outputs.changes }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
# NOTE: To extend this workflow to other features, add filter entries below
# following the same pattern, e.g.:
# <feature-name>: ./**/<feature-name>/**
filters: |
powershell: ./**/powershell/**

test:
needs: [detect-changes]
runs-on: ubuntu-24.04-arm
continue-on-error: true
strategy:
matrix:
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
baseImage:
[
"ubuntu:focal",
"ubuntu:jammy",
"debian:11",
"debian:12",
"mcr.microsoft.com/devcontainers/base:ubuntu",
"mcr.microsoft.com/devcontainers/base:debian",
"mcr.microsoft.com/devcontainers/base:noble"
]
steps:
- uses: actions/checkout@v4

- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli

- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .

test-scenarios:
needs: [detect-changes]
runs-on: ubuntu-24.04-arm
continue-on-error: true
strategy:
matrix:
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
steps:
- uses: actions/checkout@v4

- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli

- name: "Testing '${{ matrix.features }}' scenarios"
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated .
2 changes: 1 addition & 1 deletion src/powershell/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "powershell",
"version": "2.0.0",
"version": "2.0.1",
"name": "PowerShell",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/powershell",
"description": "Installs PowerShell along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
Expand Down
6 changes: 3 additions & 3 deletions src/powershell/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ install_using_github() {
# Fall back on direct download if no apt package exists in microsoft pool
if command -v apt-get > /dev/null 2>&1; then
# Debian/Ubuntu dependencies
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9] wget
elif command -v dnf > /dev/null 2>&1; then
# AlmaLinux/RHEL dependencies
check_packages curl ca-certificates gnupg2 glibc libgcc krb5-libs libstdc++ libuuid zlib libicu wget tar
Expand All @@ -394,10 +394,10 @@ install_using_github() {
install_prev_pwsh $pwsh_url
fi

# downlaod the latest version of powershell and extracting the file to powershell directory
# download the latest version of powershell and extracting the file to powershell directory
wget https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/${powershell_filename}
mkdir ~/powershell
tar -xvf powershell-${POWERSHELL_VERSION}-linux-x64.tar.gz -C ~/powershell
tar -xvf ${powershell_filename} -C ~/powershell

powershell_archive_sha256="$(cat release.html | tr '\n' ' ' | sed 's|<[^>]*>||g' | grep -oP "${powershell_filename}\s+\K[0-9a-fA-F]{64}" || echo '')"
if [ -z "${powershell_archive_sha256}" ]; then
Expand Down