Skip to content

Commit 90fd19e

Browse files
authored
Merge pull request #182 from TheSpaceDevs/development
More work on release automation
2 parents 4b17f3c + b06f8e4 commit 90fd19e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/development.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
tags: ${{ steps.meta.outputs.tags }}
4242
labels: ${{ steps.meta.outputs.labels }}
4343
build-args: |
44-
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
44+
RELEASE_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}

.github/workflows/production.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
id: docker_build
3636
uses: docker/build-push-action@v4
3737
with:
38-
push: false
38+
push: true
3939
tags: ${{ steps.meta.outputs.tags }}
4040
labels: ${{ steps.meta.outputs.labels }}
4141
build-args: |
42-
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
42+
RELEASE_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM python:3.11
1717
LABEL org.opencontainers.image.source https://github.com/TheSpaceDevs/spaceflightnewsapi
1818

1919
ARG RELEASE_VERSION
20-
ENV VERSION=$RELEASE_VERSION
20+
ENV SNAPI_VERSION=$RELEASE_VERSION
2121

2222
WORKDIR /code/
2323
COPY --from=builder /code /code

docker-compose.dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
ports:
1616
- "8000:8000"
1717
environment:
18-
- VERSION=${VERSION}
18+
- SNAPI_VERSION=${SNAPI_VERSION}
1919
- DEBUG=${DEBUG}
2020
- SECRET_KEY=${SECRET_KEY}
2121
- DB_NAME=${DB_NAME}
@@ -62,7 +62,7 @@ services:
6262
- ./snapy:/code/snapy
6363
- ./manage.py:/code/manage.py
6464
environment:
65-
- VERSION=${VERSION}
65+
- SNAPI_VERSION=${SNAPI_VERSION}
6666
- DB_NAME=${DB_NAME}
6767
- DB_USER=${DB_USER}
6868
- DB_HOST=${DB_HOST}
@@ -84,7 +84,7 @@ services:
8484
- ./snapy:/code/snapy
8585
- ./manage.py:/code/manage.py
8686
environment:
87-
- VERSION=${VERSION}
87+
- SNAPI_VERSION=${SNAPI_VERSION}
8888
- DB_NAME=${DB_NAME}
8989
- DB_USER=${DB_USER}
9090
- DB_HOST=${DB_HOST}

snapy/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import sentry_sdk
1818
from sentry_sdk.integrations.django import DjangoIntegration
1919

20-
VERSION = os.getenv("VERSION")
20+
VERSION = os.getenv("SNAPI_VERSION")
2121

2222
# Build paths inside the project like this: BASE_DIR / 'subdir'.
2323
BASE_DIR = Path(__file__).resolve().parent.parent

0 commit comments

Comments
 (0)