Skip to content

Create build-and-push.yml #1

Create build-and-push.yml

Create build-and-push.yml #1

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}/privasea-acceleration-node-beta:latest
ghcr.io/${{ github.repository }}/privasea-acceleration-node-beta:${{ github.sha }}