Skip to content

Commit

Permalink
[APIPUB-59] Update pipeline in order to use the latest package (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpardogrowthaccelerationpartners authored Jul 11, 2024
1 parent b5168a6 commit 6f546e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/on-pullrequest-dockerfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- main
paths:
- ".github/workflows/on-pullrequest-dockerfile.yml"
- "src/*"
- "**/Dockerfile*"
workflow_dispatch:

permissions: read-all
Expand All @@ -35,13 +35,25 @@ jobs:
matrix:
dockerfile:
[
{ name: "publisher", path: "src/Dockerfile" },
{ name: "development", path: "src/dev.Dockerfile" },
{ name: "publisher", path: "src/Dockerfile", type: "published" },
{ name: "development", path: "src/dev.Dockerfile", type: "local" },
]
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set Version Numbers
if: ${{ matrix.dockerfile.type == 'published' }}
id: versions
run: |
FEED="9f7770ac-66d9-4fbc-b81e-b5ad79002b62"
PACKAGE="2d9cb68f-2115-4791-a207-c6ae35d71e8d"
VERSIONS=$(curl https://feeds.dev.azure.com/ed-fi-alliance/$FEED/_apis/Packaging/Feeds/EdFi/Packages/$PACKAGE)
LATEST=$(echo $VERSIONS | jq '.versions[] | select(.isLatest == true) | .version')
echo "latest version: $LATEST"
echo "VERSION=$LATEST" >> $GITHUB_OUTPUT

- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
name: Run Linter on ${{ matrix.dockerfile.name }} Dockerfile
with:
Expand All @@ -61,7 +73,7 @@ jobs:
cd $folder
dockerfile=$(echo ${{matrix.dockerfile.path}} | awk -F"/" '{print $NF}')
docker build -f $dockerfile -t ${{ matrix.dockerfile.name }} .
docker build -f $dockerfile -t ${{ matrix.dockerfile.name }} --build-arg="VERSION=${{ steps.versions.outputs.VERSION }}" .
- name: Analyze
uses: docker/scout-action@67eb1afe777307506aaecb9acd9a0e0389cb99ae # v1.5.0
Expand Down
2 changes: 1 addition & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
FROM mcr.microsoft.com/dotnet/aspnet@sha256:ba398f8c6a0469436cc115bfbd278002baf4ce9423b6d8a9e904da6adc31a23d
LABEL maintainer="Ed-Fi Alliance, LLC and Contributors <techsupport@ed-fi.org>"

ENV VERSION="1.0.0"
ARG VERSION=latest

# Alpine image does not contain Globalization Cultures library so we need to install ICU library to get fopr LINQ expression to work
# Disable the globaliztion invariant mode (set in base image)
Expand Down

0 comments on commit 6f546e2

Please sign in to comment.