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
254 changes: 146 additions & 108 deletions .github/workflows/ci_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ jobs:
name: All succeeded
needs: # TODO - check what jobs need adding here
- build
# - test-azdo
- test-gh-run-args
- test-gh-build-args
- test-gh-dockerfile-context
Expand Down Expand Up @@ -294,34 +293,6 @@ jobs:
(cd github-action/ && npm install && npm run build && npm run package)
(cd merge/ && npm install && npm run build && npm run package)

# - name: Publish AzDO Task
# uses: ./
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }}
# AZDO_BUILD: ${{ inputs.AZDO_BUILD }}
# AZDO_ORG: ${{ inputs.AZDO_ORG }}
# AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
# AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }}
# BUILD_NUMBER: ${{ github.run_id }}
# IS_PR: ${{ github.head_ref }}
# BRANCH: ${{ github.ref }}
# with:
# imageName: ghcr.io/devcontainers/ci-devcontainer
# runCmd: |
# echo "Starting"
# ./scripts/publish-azdo-task.sh
# env: |
# BUILD_NUMBER
# IS_CI=1
# IS_PR
# BRANCH
# AZDO_TOKEN
# AZURE_DEVOPS_EXT_PAT
# AZDO_ORG
# AZDO_PROJECT
# AZDO_BUILD

- name: Create GitHub Action Release
env:
TAG_NAME: v${{ needs.build.outputs.version_short }}
Expand All @@ -338,89 +309,156 @@ jobs:
#
# When adding a new test:
# - add to the 'needs' section for the 'checks-succeeded' job
# (except test-azdo: it must not block the GitHub Action release)
# - add any new images to the image_names in clean_tags.sh
# - review the Azure DevOps pipeline and consider adding there for verification
#

# test-azdo:
# name: Run AzDO test
# runs-on: ubuntu-latest
# needs: build
# if: ${{ needs.build.outputs.image_push_option == 'filter' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
# # if the following value is missing (i.e. not triggered via comment workflow)
# # then the default checkout will apply
# ref: ${{ inputs.prRef }}

# - name: Show version
# env:
# VERSION: ${{ needs.build.outputs.version }}
# VERSION_SHORT: ${{ needs.build.outputs.version_short }}
# run: |
# echo "VERSION: $VERSION"
# echo "VERSION_SHORT: $VERSION_SHORT"

# - name: Download workflow artifacts
# uses: actions/download-artifact@v4
# with:
# path: output

# - name: Download release VSIX
# uses: actions/download-artifact@v4
# with:
# name: azdo-task-dev
# path: output

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# if: github.ref == 'refs/heads/main' # only need this for push (on `main`)
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

# # Published action contains compiled JS, but we need to compile it here
# - uses: actions/setup-node@v6
# with:
# node-version: 24
# - name: Compile GH action
# run: |
# (cd common && npm install && npm run build)
# (cd github-action/ && npm install && npm run build && npm run package)

# - name: Run AzDO test pipeline
# uses: ./
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }}
# AZDO_BUILD: ${{ inputs.AZDO_BUILD }}
# AZDO_ORG: ${{ inputs.AZDO_ORG }}
# AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
# AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }}
# BUILD_NUMBER: ${{ github.run_id }}
# IS_PR: ${{ github.head_ref }}
# BRANCH: ${{ github.ref }}
# IMAGE_TAG: ${{ needs.build.outputs.image_tag }}
# with:
# imageName: ghcr.io/devcontainers/ci-devcontainer
# runCmd: |
# echo "Starting"
# ./scripts/test-azdo.sh
# env: |
# BUILD_NUMBER
# IMAGE_TAG
# IS_CI=1
# IS_PR
# BRANCH
# AZDO_TOKEN
# AZURE_DEVOPS_EXT_PAT
# AZDO_ORG
# AZDO_PROJECT
# AZDO_BUILD
test-azdo:
name: Run AzDO test
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.outputs.image_push_option == 'filter' }}
# Not in 'checks-succeeded' needs: an AzDO failure must not block the GitHub Action release.
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
# if the following value is missing (i.e. not triggered via comment workflow)
# then the default checkout will apply
ref: ${{ inputs.prRef }}

- name: Show version
env:
VERSION: ${{ needs.build.outputs.version }}
VERSION_SHORT: ${{ needs.build.outputs.version_short }}
run: |
echo "VERSION: $VERSION"
echo "VERSION_SHORT: $VERSION_SHORT"

- name: Download workflow artifacts
uses: actions/download-artifact@v4
with:
path: output

- name: Download release VSIX
uses: actions/download-artifact@v4
with:
name: azdo-task-dev
path: output

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: github.ref == 'refs/heads/main' # only need this for push (on `main`)
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Compile GH action
run: |
(cd common && npm install && npm run build)
(cd github-action/ && npm install && npm run build && npm run package)

- name: Run AzDO test pipeline
uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }}
AZDO_BUILD: ${{ inputs.AZDO_BUILD }}
AZDO_ORG: ${{ inputs.AZDO_ORG }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }}
BUILD_NUMBER: ${{ github.run_id }}
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
IMAGE_TAG: ${{ needs.build.outputs.image_tag }}
with:
imageName: ghcr.io/devcontainers/ci-devcontainer
runCmd: |
echo "Starting"
./scripts/test-azdo.sh
env: |
BUILD_NUMBER
IMAGE_TAG
IS_CI=1
IS_PR
BRANCH
AZDO_TOKEN
AZURE_DEVOPS_EXT_PAT
AZDO_ORG
AZDO_PROJECT
AZDO_BUILD

publish-azdo:
name: Publish AzDO Task
runs-on: ubuntu-latest
needs:
- build
- test-azdo
- release
if: ${{ inputs.release == true }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Download release VSIX
uses: actions/download-artifact@v4
with:
name: azdo-task
path: output

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: github.ref == 'refs/heads/main' # only need this for push (on `main`)
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Compile GH action
run: |
(cd common && npm install && npm run build)
(cd github-action/ && npm install && npm run build && npm run package)

- name: Publish AzDO Task
uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }}
AZDO_BUILD: ${{ inputs.AZDO_BUILD }}
AZDO_ORG: ${{ inputs.AZDO_ORG }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }}
BUILD_NUMBER: ${{ github.run_id }}
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
with:
imageName: ghcr.io/devcontainers/ci-devcontainer
runCmd: |
echo "Starting"
./scripts/publish-azdo-task.sh
env: |
BUILD_NUMBER
IS_CI=1
IS_PR
BRANCH
AZDO_TOKEN
AZURE_DEVOPS_EXT_PAT
AZDO_ORG
AZDO_PROJECT
AZDO_BUILD

test-simple:
name: Run simple test
Expand Down
20 changes: 18 additions & 2 deletions azdo-task/DevcontainersCi/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,29 @@
"description": "The output of the command specified in the runCmd input"
}],
"execution": {
"Node20": {
"Node24": {
"target": "run-main.js",
"argumentFormat": ""
},
"Node20_1": {
"target": "run-main.js",
"argumentFormat": ""
},
"Node16": {
"target": "run-main.js",
"argumentFormat": ""
}
},
"postjobexecution": {
"Node20": {
"Node24": {
"target": "run-post.js",
"argumentFormat": ""
},
"Node20_1": {
"target": "run-post.js",
"argumentFormat": ""
},
"Node16": {
"target": "run-post.js",
"argumentFormat": ""
}
Expand Down
8 changes: 8 additions & 0 deletions azdo-task/DevcontainersMerge/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
}
],
"execution": {
"Node24": {
"target": "run-main.js",
"argumentFormat": ""
},
"Node20_1": {
"target": "run-main.js",
"argumentFormat": ""
},
"Node16": {
"target": "run-main.js",
"argumentFormat": ""
Expand Down
2 changes: 1 addition & 1 deletion merge/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ inputs:
required: true
description: 'Comma-separated list of platforms in standard format (e.g., linux/amd64,linux/arm64). Tag suffixes are auto-derived.'
runs:
using: 'node20'
using: 'node24'
main: 'run-main.js'