feat: add builds
This commit is contained in:
parent
1982e6e731
commit
6ac306e327
21
.github/workflows/build-on-branch.yml
vendored
Normal file
21
.github/workflows/build-on-branch.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Build tag
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: docker build . -t tandrade/short:$(echo $([[ $(git rev-parse --abbrev-ref HEAD) == master ]] && echo latest || echo latest-modsec))
|
||||||
|
- name: Login
|
||||||
|
uses: docker/login-action@v1.10.0
|
||||||
|
with:
|
||||||
|
username: tandrade
|
||||||
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
|
- name: Push
|
||||||
|
run: docker push tandrade/short:$(echo $([[ $(git rev-parse --abbrev-ref HEAD) == master ]] && echo latest || echo latest-modsec))
|
21
.github/workflows/build-on-tag.yml
vendored
Normal file
21
.github/workflows/build-on-tag.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Build tag
|
||||||
|
|
||||||
|
on:
|
||||||
|
create:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: docker build . -t tandrade/short:${GITHUB_REF/refs\/tags\//}
|
||||||
|
- name: Login
|
||||||
|
uses: docker/login-action@v1.10.0
|
||||||
|
with:
|
||||||
|
username: tandrade
|
||||||
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
|
- name: Push
|
||||||
|
run: docker push tandrade/short:${GITHUB_REF/refs\/tags\//}
|
Loading…
x
Reference in New Issue
Block a user