Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chinatsu committed Jul 20, 2021
0 parents commit e278b25
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build and push
on:
push:
branches: main
env:
configmap_image: docker.pkg.github.com/${{ github.repository }}/configmap-reload
jobs:
build-and-push:
name: Build and push to ghcr.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set version
run: |
echo "CONFIGMAP_IMAGE=${configmap_image}:$(date '+%Y-%m-%d')-$(git --no-pager log -1 --pretty=%h)" >> $GITHUB_ENV
- name: Build Docker image
run: docker build . --tag $CONFIGMAP_IMAGE --tag ${configmap_image}:latest
- name: Login to GitHub Container Registry
uses: docker/login-action@ab80d026d4753220c4243394c07c7d80f9638d06 # Use commit-sha1 instead of tag for security concerns
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker image
run: docker push $CONFIGMAP_IMAGE

5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM jimmidyson/configmap-reload@sha256:91467ba755a0c41199a63fe80a2c321c06edc4d3affb4f0ab6b3d20a49ed88d1

COPY entrypoint.sh entrypoint.sh

ENTRYPOINT [ "/bin/sh", "-c", "./entrypoint.sh" ]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# configmap-reload

A version of [jimmidyson/configmap-reload](https://github.com/jimmidyson/configmap-reload) that doesn't exit with a non-zero exit code.
2 changes: 2 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trap 'exit 0' SIGINT SIGQUIT SIGTERM
/configmap-reload

0 comments on commit e278b25

Please sign in to comment.