You've already forked pypi-proxy
Compare commits
2 Commits
f1c4b2183d
...
ef0ab15d60
| Author | SHA1 | Date | |
|---|---|---|---|
| ef0ab15d60 | |||
| 434627f001 |
68
,github/workflows/ci.yml
Normal file
68
,github/workflows/ci.yml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags:
|
||||||
|
- "!**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.22'
|
||||||
|
- name: Install gitea provider for Go Semantic Release
|
||||||
|
run: |
|
||||||
|
mkdir -p .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/ && \
|
||||||
|
wget https://github.com/cybercinch/go-semantic-release-provider-gitea/releases/download/v${GITEA_PROVIDER_VER}/go-semantic-release-provider-gitea_v${GITEA_PROVIDER_VER}_linux_amd64 \
|
||||||
|
-O .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea && \
|
||||||
|
chmod a+x .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea
|
||||||
|
env:
|
||||||
|
GITEA_PROVIDER_VER: 1.0.11
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
-
|
||||||
|
name: Login to Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create docker image
|
||||||
|
uses: go-semantic-release/action@v1
|
||||||
|
with:
|
||||||
|
hooks: exec
|
||||||
|
custom-arguments: --provider=gitea
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.G_TOKEN }}
|
||||||
|
GITEA_HOST: ${{ vars.G_SERVER_URL}}
|
||||||
|
|
||||||
|
- name: ntfy-success-notifications
|
||||||
|
uses: niniyas/ntfy-action@master
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
url: '${{ vars.NTFY_URL }}'
|
||||||
|
topic: 'ci-status'
|
||||||
|
priority: 4
|
||||||
|
tags: +1,partying_face,action,successfully,completed
|
||||||
|
details: Workflow has been successfully completed!
|
||||||
|
icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png'
|
||||||
|
image: true
|
||||||
|
|
||||||
|
- name: ntfy-failed-notifications
|
||||||
|
uses: niniyas/ntfy-action@master
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
url: '${{ vars.NTFY_URL }}'
|
||||||
|
topic: 'ci-status'
|
||||||
|
priority: 5
|
||||||
|
tags: +1,partying_face,action,failed
|
||||||
|
details: Workflow has failed!
|
||||||
|
actions: 'default'
|
||||||
22
.semrelrc
Normal file
22
.semrelrc
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"provider": {
|
||||||
|
"name": "gitea"
|
||||||
|
},
|
||||||
|
"changelog-generator": {
|
||||||
|
"name": "default",
|
||||||
|
"options": {
|
||||||
|
"emojis": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hooks": {
|
||||||
|
"names": [
|
||||||
|
"exec"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"exec_on_success": "docker buildx build --progress=plain -t cybercinch/pypi-proxy:v{{.NewRelease.Version}} -t cybercinch/pypi-proxy:latest --push .",
|
||||||
|
"exec_on_no_release": "echo {{.Reason}}: {{.Message}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
FROM nginx:latest AS build
|
FROM nginx:latest AS build
|
||||||
|
|
||||||
COPY conf/nginx.conf /etc/nginx/nginx.conf
|
COPY conf/nginx.conf /etc/nginx/nginx.conf
|
||||||
ADD --chmod=a+x entrypoint/docker-entrypoint.sh /docker-entrypoint.sh
|
COPY entrypoint/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
|
||||||
# Create the folder structure for the cache
|
# Create the folder structure for the cache
|
||||||
RUN mkdir -p /var/lib/nginx/pypi && \
|
RUN mkdir -p /var/lib/nginx/pypi && \
|
||||||
chown -R www-data:www-data /var/lib/nginx
|
chown -R www-data:www-data /var/lib/nginx && \
|
||||||
|
chmod a+x /docker-entrypoint.sh
|
||||||
|
|
||||||
FROM scratch as final
|
FROM scratch as final
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user