6 Commits
0.1.1 ... 0.1.2

Author SHA1 Message Date
62a0930a2c feat: Updates image tags
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 7s
2024-11-05 12:16:17 -05:00
fb9b41a8be feat: Using slim image to cut down on size of docker container application 2024-11-05 12:11:31 -05:00
d675ac2e39 fix: Updates tag name when building images 2024-11-05 11:42:26 -05:00
97f0ec38be fix: Updates tag name when building images 2024-11-05 11:39:15 -05:00
ebadb523de fix: Updates tag name when building images 2024-11-05 11:35:34 -05:00
7e214fc9a1 fix: Updates tag name when building images 2024-11-05 11:27:48 -05:00
3 changed files with 12 additions and 4 deletions

View File

@@ -5,11 +5,14 @@ name: Create and publish a Docker image
on:
push:
branches: ['release']
tags:
- '*'
workflow_dispatch:
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: swift-mqtt-dewpoint
IMAGE_NAME: ${{ github.repository }}
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
@@ -38,6 +41,10 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.

View File

@@ -8,6 +8,7 @@ COPY . .
RUN swift build --enable-test-discovery -c release -Xswiftc -g
# Run image
FROM swift:5.10
FROM swift:5.10-slim
WORKDIR /run
COPY --from=build /build/.build/release /run
COPY --from=build /build/.build/release/dewPoint-controller /run
CMD ["/bin/bash", "-xc", "./dewPoint-controller"]

View File

@@ -2,8 +2,8 @@
services:
server:
image: swift-mqtt-dewpoint:latest
restart: unless-stopped
env_file: .env
command: /bin/bash -xc "./dewPoint-controller"
test:
image: swift:latest