Skip to content

Commit

Permalink
Add Github workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Del Rincón López committed Sep 27, 2023
1 parent 5c182ef commit 6945de5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and publish Docker image

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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@v1
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 }}

0 comments on commit 6945de5

Please sign in to comment.