Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
ci: add build-ci img workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Dec 14, 2023
1 parent f79e674 commit edcdb76
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build_ci_img.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 🔧 Build CI Img

on:
# Push includes PR merge
push:
branches:
- master
paths:
- docker/**
- .github/workflows/**
# Allow manual trigger
workflow_dispatch:

jobs:
underpass-ci-build:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
dockerfile: docker/underpass.dockerfile
scan_dockerfile: false
scan_image: false
build_target: ci
image_tags: |
"ghcr.io/${{ github.repository }}:ci"
invalidate-cache:
runs-on: ubuntu-latest
steps:
- name: Delete CI Img Cache
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete image-cache-${{ runner.os }} \
-R ${{ github.repository }} \
-B ${{ github.ref_name }} \
--confirm || true
6 changes: 2 additions & 4 deletions docker/underpass.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ RUN set -ex \


FROM deps as ci
# Add code only for tests
COPY . .
RUN mv docker/ci-entrypoint.sh /ci-entrypoint.sh \
&& chmod +x /ci-entrypoint.sh
COPY docker/ci-entrypoint.sh /ci-entrypoint.sh
RUN chmod +x /ci-entrypoint.sh
ENTRYPOINT [ "/ci-entrypoint.sh" ]


Expand Down

0 comments on commit edcdb76

Please sign in to comment.