Skip to content

Commit

Permalink
Merge pull request #14 from hpidcock/ghcr
Browse files Browse the repository at this point in the history
ghcr.io repository + juju (170:170) user and group
  • Loading branch information
hpidcock authored Oct 9, 2023
2 parents 3444523 + 99a2264 commit df9d2a2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,25 @@ jobs:
EOF
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to ECR Public
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: public.ecr.aws
username: ${{ secrets.RELEASE_ECR_ACCESS_KEY_ID }}
password: ${{ secrets.RELEASE_ECR_SECRET_ACCESS_KEY }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push images
if: ${{ success() && github.ref == 'refs/heads/master' }}
run: |
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE

RUN apt-get update
# Add the juju user for rootless agents.
# 170 uid/gid is sourced from juju/juju
RUN groupadd --gid 170 juju
RUN useradd --uid 170 --gid 170 --no-create-home --shell /usr/bin/bash juju

RUN apt-get install -y --no-install-recommends \
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3-yaml \
python3-pip \
python3-distutils \
Expand Down
3 changes: 3 additions & 0 deletions images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ images:
registry_paths:
- docker.io/jujusolutions/charm-base
- public.ecr.aws/juju/charm-base
- ghcr.io/juju/charm-base
tags:
- ubuntu-22.04
- latest
Expand All @@ -27,6 +28,7 @@ images:
registry_paths:
- docker.io/jujusolutions/charm-base
- public.ecr.aws/juju/charm-base
- ghcr.io/juju/charm-base
tags:
- ubuntu-20.04
platforms:
Expand All @@ -47,6 +49,7 @@ images:
registry_paths:
- docker.io/jujusolutions/charm-base
- public.ecr.aws/juju/charm-base
- ghcr.io/juju/charm-base
tags:
- ubuntu-18.04
platforms:
Expand Down

0 comments on commit df9d2a2

Please sign in to comment.