Skip to content

Commit 248e98e

Browse files
Update file paths in github workflows
1 parent f56950a commit 248e98e

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
packages: write
2626

2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929

3030
- name: Setup .NET Core
31-
uses: actions/setup-dotnet@v3
31+
uses: actions/setup-dotnet@v4
3232
with:
3333
dotnet-version: 8.0.x
3434

@@ -56,7 +56,7 @@ jobs:
5656
uses: docker/build-push-action@v5.1.0
5757
with:
5858
context: .
59-
file: ./docker/Prod.Dockerfile
59+
file: ./src/Kattbot/prod.Dockerfile
6060
push: true
6161
tags: ${{ steps.meta.outputs.tags }}
6262
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release-v2.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ env:
1616
REGISTRY: ghcr.io
1717
IMAGE_NAME: kattbot
1818
COMPOSE_PROJECT_NAME: kattbot
19-
COMPOSE_FILE_NAME: prod-compose.yml
19+
COMPOSE_FILE_PATH_SRC: docker/docker-compose.prod.yml
20+
COMPOSE_FILE_NAME: docker-compose.prod.yml
2021
DB_NAME: kattbot
2122
DB_BACKUP_SCRIPT: kattbot-backup-db.sh
2223
DB_MIGRATION_SCRIPT: database_migration.sql
@@ -61,7 +62,7 @@ jobs:
6162
username: ${{secrets.KATTBOT_USER}}
6263
key: ${{secrets.KATTBOT_KEY}}
6364
passphrase: ${{secrets.KATTBOT_PASSPHRASE}}
64-
source: "docker/${{ env.COMPOSE_FILE_NAME }}"
65+
source: ${{ env.COMPOSE_FILE_PATH_SRC }}
6566
target: "$HOME/"
6667
strip_components: 1
6768
overwrite: true
@@ -84,13 +85,10 @@ jobs:
8485
script_stop: true
8586
script: |
8687
FULL_IMAGE_NAME="$REGISTRY/$REPOSITORY_NAME/$IMAGE_NAME:$IMAGE_TAG"
87-
FULL_IMAGE_NAME_PREVIOUS="$REGISTRY/$REPOSITORY_NAME/$IMAGE_NAME:$IMAGE_TAG-previous"
88+
echo "Full image name: $FULL_IMAGE_NAME"
8889
8990
MIGRATIONS_CONTAINER_NAME="$COMPOSE_PROJECT_NAME-migrations"
9091
91-
# Tag the previous image with the previous tag, if it exists
92-
docker image tag $FULL_IMAGE_NAME $FULL_IMAGE_NAME_PREVIOUS || true
93-
9492
# Pull the image from the registry
9593
echo $GHCR_PASSWORD | docker login $REGISTRY -u $GHCR_USERNAME --password-stdin
9694
docker pull $FULL_IMAGE_NAME
@@ -116,6 +114,9 @@ jobs:
116114
# Run the database migration script
117115
psql -d $DB_NAME -q -f "$TMP_MIGRATIONS_DIR/$DB_MIGRATION_SCRIPT"
118116
117+
# Remove the temporary directory
118+
rm -rf $TMP_MIGRATIONS_DIR
119+
119120
# Take down the old compose project, if it exists
120121
docker compose -p $COMPOSE_PROJECT_NAME down || true
121122
@@ -124,9 +125,6 @@ jobs:
124125
125126
# Prune untagged images
126127
docker image prune -f
127-
128-
# Remove the temporary directory
129-
rm -rf $TMP_MIGRATIONS_DIR
130128
envs: >-
131129
HOST_GATEWAY_IP,
132130
REGISTRY,

0 commit comments

Comments
 (0)