name: Docker
on:
push:
branches:
jobs:
build-and-push:
runs-on: ubicloud-standard-8
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Log in to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push ws-echo image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: Dockerfile.ws-echo
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/ws-echo:latest
ghcr.io/${{ github.repository_owner }}/ws-echo:${{ github.sha }}