-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e278b25
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
trap 'exit 0' SIGINT SIGQUIT SIGTERM | ||
/configmap-reload |