Skip to content

Commit

Permalink
Create deploy-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea authored Jan 29, 2024
1 parent fda712d commit 0e67345
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to GitHub Container Registry

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
run: |
docker build --file Dockerfile --tag ${{ github.repository }}:latest .
docker tag ${{ github.repository }}:latest docker.pkg.github.com/${{ github.repository }}/zarn:latest
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: docker.pkg.github.com
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Docker image to GitHub Container Registry
run: docker push docker.pkg.github.com/${{ github.repository }}/zarn:latest

0 comments on commit 0e67345

Please sign in to comment.