Skip to content

Commit 449142a

Browse files
committed
Bringing NXP dev container up to date
***NO_CI***
1 parent 2eb9aa4 commit 449142a

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.02
1+
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.03
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
# Copyright (c) .NET Foundation and Contributors
22
# See LICENSE file in the project root for full license information.
33

4-
name: Push Docker image [FreeRTOS-NXP]
4+
name: Build Dev Container for FreeRTOS-NXP
55

66
env:
77
CONTAINER_REPO: ghcr.io
88
CONTAINER_NAME: dev-container-freertos-nxp
9-
CONTAINER_SOURCE_FILE: .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP.SRC
10-
CONTAINER_VERSION_FILE: .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP
9+
CONTAINER_SRC_FILE: .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP.SRC
1110

1211
on:
1312
push:
1413
branches:
1514
- main
1615
paths:
17-
- '**Dockerfile.FreeRTOS-NXP' # We only care if the version has changed!
16+
- '**Dockerfile.FreeRTOS-NXP'
1817

1918
workflow_dispatch:
2019

2120
jobs:
2221
build:
2322
if: ${{ vars.PUBLISH_DOCKER_IMAGE == 'true' }}
2423
runs-on: ubuntu-latest
25-
permissions:
26-
contents: read
27-
packages: write
28-
2924
steps:
3025

3126
- name: Checkout Repository
@@ -40,29 +35,28 @@ jobs:
4035
large-packages: false
4136

4237
- name: Get container version
43-
shell: pwsh
4438
run: |
45-
$dockerfileContent = Get-Content("${{ env.CONTAINER_VERSION_FILE }}")
39+
$dockerfileContent = Get-Content(".devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP")
4640
$dockerfileContent -match '(?<=\:)(?:[v]\d+.\d+)'
4741
$containerVersion = $Matches[0].ToString()
4842
echo "GCR_VERSION=$containerVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
43+
shell: pwsh
4944

5045
- name: Set up Docker Buildx
5146
uses: docker/setup-buildx-action@v3
5247

5348
- name: Login to GitHub Container Registry
54-
if: ${{ github.event_name != 'pull_request' }}
5549
uses: docker/login-action@v3
5650
with:
57-
registry: ${{ env.CONTAINER_REPO }}
51+
registry: ghcr.io
5852
username: ${{ github.repository_owner }}
59-
password: ${{ secrets.GITHUB_TOKEN }}
53+
password: ${{ secrets.CONTAINER_BUILD_TOKEN }}
6054

6155
- name: Build and Push Docker Image
6256
uses: docker/build-push-action@v5
6357
with:
64-
file: ${{ env.CONTAINER_SOURCE_FILE }}
65-
push: ${{ github.event_name != 'pull_request' }}
58+
file: ${{ env.CONTAINER_SRC_FILE }}
59+
push: true # Will only build if this is not here
6660
tags: |
6761
${{ env.CONTAINER_REPO }}/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:${{ env.GCR_VERSION }}
6862
${{ env.CONTAINER_REPO }}/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:latest

0 commit comments

Comments
 (0)