Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

FIX: GitHub action #69

Merged
merged 2 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/docker-app-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths:
- "backend/**"
release:
types: [created]
types: [published]

jobs:
docker:
Expand All @@ -25,6 +25,14 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Set Docker tag based on release name or commit hash
run: |
if [[ "${{ github.event.release.name }}" != "" ]]; then
echo "DOCKER_TAG=${{ github.event.release.name }}" >> $GITHUB_ENV
else
echo "DOCKER_TAG=${{ github.sha }}" >> $GITHUB_ENV
fi
-
name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -33,4 +41,4 @@ jobs:
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/draft-backend:${{ github.sha }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/draft-backend:${{ env.DOCKER_TAG }}
12 changes: 10 additions & 2 deletions .github/workflows/docker-migration-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths:
- "migrations/**"
release:
types: [created]
types: [published]

jobs:
docker:
Expand All @@ -25,6 +25,14 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Set Docker tag based on release name or commit hash
run: |
if [[ "${{ github.event.release.name }}" != "" ]]; then
echo "DOCKER_TAG=${{ github.event.release.name }}" >> $GITHUB_ENV
else
echo "DOCKER_TAG=${{ github.sha }}" >> $GITHUB_ENV
fi
-
name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -33,4 +41,4 @@ jobs:
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/draft-migration:${{ github.sha }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/draft-migration:${{ env.DOCKER_TAG }}
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ services:
- draft-backend-network

redis:
build: ./tmp/cache
image: redis:7.0.11
restart: always
ports:
- 6379:6379
Expand Down
1 change: 0 additions & 1 deletion tmp/cache/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion tmp/db/Dockerfile

This file was deleted.

Loading