-
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 2e060b6
Showing
5 changed files
with
144 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,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
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,38 @@ | ||
name: container build latest | ||
on: | ||
workflow_run: | ||
workflows: ["Test"] | ||
branches: [main] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
container_image: | ||
name: container_image | ||
if: github.event.workflow_run.conclusion == 'success' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@master | ||
- name: image name | ||
id: set-image-name | ||
run: | | ||
name="$(echo ${{ github.repository }} | tr 'A-Z' 'a-z')" | ||
echo "image=ghcr.io/$name:latest" >> $GITHUB_OUTPUT | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@master | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@master | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.set-image-name.outputs.image }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,61 @@ | ||
name: release | ||
concurrency: | ||
group: release | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+*' | ||
jobs: | ||
container_image: | ||
name: container_image | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image: ${{ steps.set-image-name.outputs.image }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@master | ||
- name: image name | ||
id: set-image-name | ||
run: | | ||
name="$(echo ${{ github.repository }} | tr 'A-Z' 'a-z')" | ||
echo "image=ghcr.io/$name:${{ github.ref_name }}" >> $GITHUB_OUTPUT | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@master | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@master | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.set-image-name.outputs.image }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
needs: [container_image] | ||
steps: | ||
- name: download cache-artifacts | ||
uses: actions/cache/restore@main | ||
with: | ||
path: ./artifacts | ||
key: artifacts | ||
|
||
- name: ${{ github.ref_name }} | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body: | | ||
container image: | ||
``` | ||
${{ needs.container_image.outputs.image }} | ||
``` | ||
files: | | ||
./artifacts/* |
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,23 @@ | ||
name: Test | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@master | ||
|
||
- name: Build container | ||
uses: docker/build-push-action@master | ||
with: | ||
context: . | ||
push: false | ||
tags: test | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,11 @@ | ||
FROM docker.io/nginx:1.27.0-alpine3.19-slim as copy | ||
|
||
FROM docker.io/alpine:3.20.0 as settings | ||
RUN apk --no-cache add libcap | ||
COPY --from=copy /usr/sbin/nginx /usr/sbin/nginx | ||
RUN setcap cap_net_bind_service+ep /usr/sbin/nginx | ||
|
||
FROM docker.io/nginx:1.27.0-alpine3.19-slim | ||
COPY --from=settings /usr/sbin/nginx /usr/sbin/nginx | ||
|
||
|