Skip to content

Commit

Permalink
try to be crappier
Browse files Browse the repository at this point in the history
I have very little faith that this will work, but giving it a shot!
  • Loading branch information
michaelkirk committed Apr 3, 2024
1 parent 00876fc commit f0e6638
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 10 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build, Test, and Publish Containers

on:
push:
branches:
- mkirk/ghcr
- main # Trigger on pushes to main branch
pull_request:
branches:
- main # Also trigger on pull requests to main

jobs:
build-test-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install deps
run: sudo apt install zsh

- name: Build
run: ./run-rust.sh --all -- make build-all test-all

- name: Login to GitHub Container Registry
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: ./run-rust.sh --all -- make publish-all
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ default: build-all
build-all: libproj-builder proj-ci-without-system-proj proj-ci geo-ci

geo-ci:
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)geo-ci.Dockerfile -t georust/geo-ci:$(DOCKER_TAG) .
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)geo-ci.Dockerfile -t ghcr.io/georust/geo-ci:$(DOCKER_TAG) .

proj-ci:
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)proj-ci.Dockerfile -t georust/proj-ci:$(DOCKER_TAG) .
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)proj-ci.Dockerfile -t ghcr.io/georust/proj-ci:$(DOCKER_TAG) .

proj-ci-without-system-proj:
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)proj-ci-without-system-proj.Dockerfile -t georust/proj-ci-without-system-proj:$(DOCKER_TAG) .
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)proj-ci-without-system-proj.Dockerfile -t ghcr.io/georust/proj-ci-without-system-proj:$(DOCKER_TAG) .

libproj-builder:
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)libproj-builder.Dockerfile -t georust/libproj-builder:$(DOCKER_TAG) .
$(DOCKER_BUILD_CMD) -f $(DOCKERFILE_DIR)libproj-builder.Dockerfile -t ghcr.io/georust/libproj-builder:$(DOCKER_TAG) .

publish-all: publish-libproj-builder publish-proj-ci-without-system-proj publish-proj-ci publish-geo-ci

Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/geo-ci.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://hub.docker.com/orgs/georust/geo-ci
# https://github.com/orgs/georust/packages/container/package/geo-ci

# ------------------------------------------------------------------------------
# Final stage
Expand All @@ -7,7 +7,7 @@
ARG RUST_VERSION
ARG PROJ_VERSION

FROM georust/libproj-builder:proj-${PROJ_VERSION}-rust-${RUST_VERSION} as libproj-builder
FROM ghcr.io/georust/libproj-builder:proj-${PROJ_VERSION}-rust-${RUST_VERSION} as libproj-builder
FROM rust:$RUST_VERSION-bullseye

ARG RUST_VERSION
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/proj-ci-without-system-proj.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://hub.docker.com/orgs/georust/proj-ci-without-system-proj
# https://github.com/orgs/georust/packages/container/package/proj-ci-without-system-proj

# This container is based on the libproj-builder container, which has built
# libproj, and thus has all the dependencies for building proj from source, but
Expand All @@ -7,7 +7,7 @@
ARG RUST_VERSION
ARG PROJ_VERSION

FROM georust/libproj-builder:proj-${PROJ_VERSION}-rust-${RUST_VERSION}
FROM ghcr.io/georust/libproj-builder:proj-${PROJ_VERSION}-rust-${RUST_VERSION}

ARG RUST_VERSION
ARG PROJ_VERSION
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/proj-ci.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# https://hub.docker.com/orgs/georust/proj-ci
# https://github.com/orgs/georust/packages/container/package/proj-ci

ARG RUST_VERSION
ARG PROJ_VERSION
FROM georust/libproj-builder:proj-${PROJ_VERSION}-rust-${RUST_VERSION}
FROM ghcr.io/georust/libproj-builder:proj-${PROJ_VERSION}-rust-${RUST_VERSION}

ARG RUST_VERSION
ARG PROJ_VERSION
Expand Down

0 comments on commit f0e6638

Please sign in to comment.