Skip to content

Commit

Permalink
Update main_build-aspnetcore.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LanceMcCarthy committed Feb 8, 2024
1 parent ca0683f commit c862a46
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/main_build-aspnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
# A job that containerizes an ASP.NET Core web app with Relerik Reporting REST service and publish to Docker Hub
build_aspnetcore:
runs-on: ubuntu-22.04

# REQUIRED For 'akeyless' step
permissions:
id-token: write
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -39,7 +41,6 @@ jobs:
cd src/AspNetCore/MyAspNetCoreApp/wwwroot/js
echo ${{ steps.akeyless.outputs.KENDO_LICENSE_FILE }} > kendo-ui-license.js
# Preparing for docker build
- name: Generate a version number for new tag
id: tag-creator
run: |
Expand All @@ -50,33 +51,22 @@ jobs:
- name: Verify tag output
run: echo ${{ steps.tag-creator.outputs.DOCKER_HUB_TAG }}

# Since I want to build for multiple platforms, QEMU sets up emulation for those OS build
- name: Set up QEMU (for multiarch build help)
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx (for multiarch build help)
uses: docker/setup-buildx-action@v3

# Get the existing metadata to save some work
- name: Get package metadata from Docker Hub
id: meta
uses: docker/metadata-action@v5
with:
images: lancemccarthy/myaspnetcoreapp

# Authenticate with Docker Hub
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ steps.akeyless.outputs.DOCKER_HUB_USERNAME }}
password: ${{ steps.akeyless.outputs.DOCKER_HUB_PAT }}

# Build the multi-arch images images and publish with the same tag
- name: Build and push to Docker Hub
uses: docker/build-push-action@v5
with:
context: src/AspNetCore/MyAspNetCoreApp
platforms: linux/arm64
push: true
secrets: |
telerik_key=${{ steps.akeyless.outputs.TELERIK_NUGET_KEY }}
Expand Down

0 comments on commit c862a46

Please sign in to comment.