Skip to content

ci: use ghcr for build and hosting #2

ci: use ghcr for build and hosting

ci: use ghcr for build and hosting #2

Workflow file for this run

name: Build and upload image to GHCR
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
push-image:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Login to GHCR'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build and upload image'
run: |
docker build . --tag ghcr.io/ankush/personal_blog:latest
docker push ghcr.io/ankush/personal_blog:latest