Skip to content

Commit

Permalink
add example to push to ACR instead (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
some-natalie authored Nov 7, 2022
1 parent af35220 commit 49c47bf
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/push-to-ACR.yml
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 }}

0 comments on commit 49c47bf

Please sign in to comment.