From 1778bbad0d6fbc099deec2de6bbff8efab81fc92 Mon Sep 17 00:00:00 2001 From: Histalek <16392835+Histalek@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:32:14 +0200 Subject: [PATCH] ci: Update various github actions Fingers crossed that this doesn't break --- .github/workflows/build.yml | 68 ++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4aecd64..3e487fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,48 +2,40 @@ name: .NET Core build & build docker dev image on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - run: sudo apt-get install -y mono-complete - - name: Install dependencies - run: nuget install -o packages - - name: Build executable - run: msbuild -p:Configuration=Release - - name: Upload a Build Artifact - uses: actions/upload-artifact@v2.2.0 - with: - # Artifact name - name: NeoDocCompiled - # A file, directory or wildcard pattern that describes what to upload - path: bin/Release/* - retention-days: 30 - - name: Login to GitHub Registry - uses: docker/login-action@v1 - if: github.event_name != 'pull_request' - with: - registry: docker.pkg.github.com - username: $GITHUB_ACTOR - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker images - uses: docker/build-push-action@v2.0.1 - with: - # Build's context is the set of files located in the specified PATH or URL - context: . - # List of tags - tags: docker.pkg.github.com/ttt-2/neodoc/neodoc:dev - # Always attempt to pull a newer version of the image - pull: true - load: true - - name: Push docker image - if: github.event_name != 'pull_request' - run: docker push docker.pkg.github.com/ttt-2/neodoc/neodoc:dev + - uses: actions/checkout@v4 + - name: Setup .NET Core + run: sudo apt-get install -y mono-complete + - name: Install dependencies + run: nuget install -o packages + - name: Build executable + run: msbuild -p:Configuration=Release + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4 + with: + name: NeoDocCompiled + path: bin/Release/* + retention-days: 30 + - name: Login to GitHub Registry + uses: docker/login-action@v3 + if: github.event_name != 'pull_request' + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v6 + with: + tags: ghcr.io/ttt-2/neodoc/neodoc:dev + pull: true + push: true + load: true + if: github.event_name != 'pull_request'