Compare commits
5 Commits
ae140fafa6
...
fc5e54e730
| Author | SHA1 | Date | |
|---|---|---|---|
| fc5e54e730 | |||
| bdde33e68a | |||
|
58ae75da62
|
|||
|
f87295d1d7
|
|||
|
62455e4a2a
|
@@ -0,0 +1,46 @@
|
||||
name: Docker Build and Push
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: jcabillot/huawei-3g-sms-api
|
||||
tags: |
|
||||
#type=ref,event=branch
|
||||
#type=ref,event=pr
|
||||
#type=sha
|
||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
pull: true
|
||||
+1
-1
@@ -19,7 +19,7 @@ WORKDIR "/app"
|
||||
|
||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||
|
||||
COPY --from=binwiederhier/ntfy:v2.0.1 /usr/bin/ntfy /usr/local/bin/ntfy
|
||||
COPY --from=binwiederhier/ntfy:v2.24.0 /usr/bin/ntfy /usr/local/bin/ntfy
|
||||
RUN mkdir /etc/ntfy
|
||||
|
||||
COPY --from=pipdependencies /root/.local /root/.local
|
||||
|
||||
Reference in New Issue
Block a user