Skip to content

Commit

Permalink
build: fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MaSch0212 committed Jun 6, 2024
1 parent 3d4490a commit 1b05b34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
if: github.ref == 'refs/heads/main'

- name: Push docker
id: push_docker
run: pnpm docker:push
if: github.ref == 'refs/heads/main'

Expand All @@ -58,6 +59,5 @@ jobs:
app-name: "Minigolffreitag"
slot-name: "production"
publish-profile: ${{ secrets.AzureAppService_PublishProfile_4d5a9096408d4948a5453808899f123a }}
images: "masch0212/minigolf-friday:latest"
restart: true
images: "masch0212/minigolf-friday:${{ steps.push_docker.outputs.docker_tag }}"
if: github.ref == 'refs/heads/main'
3 changes: 3 additions & 0 deletions scripts/docker-push.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { spawnSync } from "child_process";
import { repository, imageName, repoRootDir, getVersionTag } from "./docker-vars.js";
import { appendFileSync } from "fs";

const tag = getVersionTag();
spawnSync(
Expand All @@ -15,3 +16,5 @@ spawnSync("docker", ["push", `${repository}/${imageName}:latest`], {
cwd: repoRootDir,
stdio: "inherit",
});

appendFileSync(process.env.GITHUB_OUTPUT, `docker_tag=${tag}\n`);

0 comments on commit 1b05b34

Please sign in to comment.