Skip to content

Commit

Permalink
CI: Build & publish docker image (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree authored Jan 4, 2023
1 parent 7a6e131 commit 65860ee
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
push:
branches:
- master
- staging

env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

jobs:
push-to-docker-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: docker build --build-arg BUILD_ENV=${GITHUB_REF##*/} -t captainfact/api:${GITHUB_REF##*/} .
- run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- run: docker push captainfact/api:${GITHUB_REF##*/}

0 comments on commit 65860ee

Please sign in to comment.