mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-17 05:42:54 -04:00
Replace Travis with GHA
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
name: Build Image
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
env:
|
||||
DOCKERHUB: "user/endpoint"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Build image
|
||||
id: build
|
||||
run: |
|
||||
docker build --no-cache -t ${DOCKERHUB}:${{ github.sha }} .
|
||||
|
||||
- name: Push image
|
||||
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) }}
|
||||
run: |
|
||||
# Tag image
|
||||
docker tag ${DOCKERHUB}:${{ github.sha }} ${DOCKERHUB}:latest
|
||||
# Login to DockerHub
|
||||
echo ${{ secrets.DOCKERPASS }} | docker login -u ${{ secrets.DOCKERUSER }} --password-stdin
|
||||
# Push all of the tags
|
||||
docker push ${DOCKERHUB}:${{ github.sha }}
|
||||
docker push ${DOCKERHUB}:latest
|
||||
Reference in New Issue
Block a user