Skip to content

update workflow.

update workflow. #4

Workflow file for this run

name: Build and publish Docker image
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file BlazorApp1/Server/Dockerfile --tag ghcr.io/${{ github.actor }}/weatherforecastapp:${{ github.sha }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the Docker image
run: docker push ghcr.io/${{ github.actor }}/weatherforecastapp:${{ github.sha }}