Skip to content

Commit

Permalink
Github Action for docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
linjungz committed Apr 14, 2023
1 parent 441b1fa commit bfc4347
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker Build

on:
push:
tags: ["personal"]

env:
IMAGE_NAME: myjarvis

jobs:
build:
name: Build container image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Log into registry
uses: docker/login-action@v1
with:
registry: ${{ secrets.ACR_ENDPOINT }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Build & Push
uses: docker/build-push-action@v2
with:
push: true
build-args: |
version=${{ steps.tag.outputs.tag }}
tags: ${{ secrets.ACR_ENDPOINT }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }}

1 comment on commit bfc4347

@vercel
Copy link

@vercel vercel bot commented on bfc4347 Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.