mirror of
https://github.com/michivonah/themepark-alerts.git
synced 2025-12-22 20:36:27 +01:00
create new github action for automated deployment
This commit is contained in:
parent
7522a8026f
commit
06ba3ef0e1
2 changed files with 25 additions and 18 deletions
18
.github/workflows/dockerhub-autopublishing.yml
vendored
18
.github/workflows/dockerhub-autopublishing.yml
vendored
|
|
@ -1,18 +0,0 @@
|
||||||
name: Docker-Hub-Autopublishing
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: debian-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Build docker image and push to docker hub
|
|
||||||
run: |
|
|
||||||
echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u michivonah --password-stdin
|
|
||||||
docker image build -t michivonah/ep-alerts:latest .
|
|
||||||
docker push michivonah/ep-alerts:latest
|
|
||||||
25
.github/workflows/image-build.yml
vendored
Normal file
25
.github/workflows/image-build.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
name: Build Docker Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: push docker image to docker hub
|
||||||
|
runs-on: debian-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: login to docker hub
|
||||||
|
id: docker-hub
|
||||||
|
env:
|
||||||
|
username: ${{secrets.DOCKER_USERNAME}}
|
||||||
|
password: ${{secrets.DOCKER_TOKEN}}
|
||||||
|
run: |
|
||||||
|
docker login -u $username -p $password
|
||||||
|
- name: build the docker image
|
||||||
|
id: build-docker-image
|
||||||
|
run: |
|
||||||
|
docker build -t michivonah/ep-alerts:latest .
|
||||||
|
- name: push the docker image
|
||||||
|
id: push-docker-image
|
||||||
|
run: docker push michivonah/ep-alerts:latest
|
||||||
Loading…
Add table
Add a link
Reference in a new issue