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 7, 2024
1 parent 599dd2b commit 63aeaa2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/main_build-aspnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
fetch-depth: 0

# I am getting all my secrets from AKeyless (you can use GitHub Actions secrets)
# Getting all my secrets from AKeyless is a personal choice, you can use GitHub Actions secrets instead.
- name: Fetch secrets from AKeyless
id: akeyless
uses: LanceMcCarthy/akeyless-action@v3
Expand All @@ -39,6 +39,7 @@ 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 @@ -49,22 +50,33 @@ 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, linux/amd64
push: true
secrets: |
telerik_key=${{ steps.akeyless.outputs.TELERIK_NUGET_KEY }}
Expand Down

0 comments on commit 63aeaa2

Please sign in to comment.