Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions to push to ghcr.io #1

Merged
merged 2 commits into from
Dec 13, 2024
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
45 changes: 45 additions & 0 deletions .github/workflows/build_and_publish_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build and publish images
on:
workflow_dispatch:
push:
tags:
- v*
permissions:
packages: write
contents: read
jobs:
build-csm-rie:
runs-on: ubuntu-latest
steps:
- name: check out the repo
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/openchami/csm-rie

# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=sha
- name: setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: login to github container repo
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push csm-rie image
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
12 changes: 0 additions & 12 deletions .github/workflows/build_and_release_image.yaml

This file was deleted.

9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

FROM artifactory.algol60.net/docker.io/library/alpine:3.17 AS base
FROM cgr.dev/chainguard/wolfi-base AS base

COPY src/requirements.txt /app/requirements.txt

Expand All @@ -43,8 +43,6 @@ RUN set -ex \
openssl-dev \
libffi-dev \
gcc \
musl-dev \
cargo \
curl \
&& pip3 install --upgrade \
pip \
Expand All @@ -57,9 +55,8 @@ RUN set -ex \
gcc \
python3-dev \
openssl-dev \
libffi-dev \
musl-dev \
cargo
libffi-dev


# Insert our emulator extentions
COPY src /app
Expand Down