Skip to content

Commit

Permalink
# This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

# This is the commit message #2:

Publish the docker image on push.
  • Loading branch information
jamesiarmes committed Jun 26, 2023
1 parent f42d4e4 commit 01c4353
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,33 @@ jobs:
bundler-cache: true
- name: Run tests
run: bundle exec rspec

image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,33 @@ jobs:
bundler-cache: true
- name: Run tests
run: bundle exec rspec

image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ RUN apt-get update && \
libpq-dev \
postgresql-client \
python3-pip \
python3-psycopg2 \
wget

# The senzing API requires libssl1.1, but it's not available by default.
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
apt-get install -y ./libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
rm ./libssl1.1_1.1.0g-2ubuntu4_amd64.deb

# Add the senzing repo and install the API.
RUN wget https://senzing-production-apt.s3.amazonaws.com/senzingrepo_1.0.0-1_amd64.deb && \
apt-get install -y ./senzingrepo_1.0.0-1_amd64.deb && \
Expand Down Expand Up @@ -46,7 +52,7 @@ ENV PATH=/opt/cmr/bin:${PATH}:/opt/senzing/g2/python
ENV RUBY_YJIT_ENABLE=true
ENV SENZING_API_SERVER_BIND_ADDR=all

RUN pip3 install psycopg2 --user
#RUN pip3 install psycopg2 --user

WORKDIR /home/senzing

Expand Down

0 comments on commit 01c4353

Please sign in to comment.