mirror of
https://github.com/pldubouilh/gossa
synced 2025-12-06 08:22:32 +01:00
autodeploy dockerhub
This commit is contained in:
parent
de632f9ab7
commit
cb4631c086
2 changed files with 31 additions and 1 deletions
|
|
@ -1,7 +1,6 @@
|
|||
name: ci
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -20,3 +19,4 @@ jobs:
|
|||
|
||||
- name: Run
|
||||
run: make test
|
||||
|
||||
30
.github/workflows/deploy.yml
vendored
Normal file
30
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: deploy
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Set env
|
||||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
||||
- name: docker
|
||||
env:
|
||||
DOCKER_USER: ${{secrets.DOCKER_USER}}
|
||||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
|
||||
run: |
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
||||
docker build -t pldubouilh/gossa:latest -t pldubouilh/gossa:$GIT_TAG -f support/build.Dockerfile .
|
||||
docker push pldubouilh/gossa:latest
|
||||
docker push pldubouilh/gossa:$GIT_TAG
|
||||
|
||||
Loading…
Reference in a new issue