-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add example to push to ACR instead (#152)
- Loading branch information
1 parent
af35220
commit 49c47bf
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build/push to ACR | ||
|
||
on: | ||
workflow_dispatch: # build on demand | ||
|
||
jobs: | ||
build-ubuntu: | ||
runs-on: ubuntu-latest # use the GitHub hosted runners | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set outputs | ||
id: vars | ||
run: echo ::set-output name=sha_short::${GITHUB_SHA::7} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Azure Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: kubernoodles.azurecr.io | ||
username: ${{ secrets.ACR_USERNAME }} | ||
password: ${{ secrets.ACR_PASSWORD }} | ||
|
||
- name: Build and push the image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: "images/ubuntu-jammy.Dockerfile" | ||
push: true | ||
tags: | | ||
kubernoodles.azurecr.io/ubuntu-jammy:${{ steps.vars.outputs.sha_short }} |