Skip to content

Create directory /data in dockerfile and point files to there #12

Create directory /data in dockerfile and point files to there

Create directory /data in dockerfile and point files to there #12

name: Build and Publish
permissions:
contents: write
packages: write
on:
push:
branches: [ main ]
jobs:
buildandpublish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.x'
- name: Publish App
run: dotnet publish ./FundaScraper/FundaScraper.csproj -c Release -o ./publish
- name: Get XML Version in .csproj
id: getVersion
uses: mavrosxristoforos/[email protected]
with:
xml-file: 'FundaScraper/FundaScraper.csproj'
xpath: '/Project/PropertyGroup/Version'
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v3
with:
context: .
file: ./FundaScraper/Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
ghcr.io/marcel0024/funda-scraper:${{ steps.getVersion.outputs.info }}
ghcr.io/marcel0024/funda-scraper:latest