chore: moving to github actions
This commit is contained in:
52
.github/workflows/on_release.yml
vendored
Normal file
52
.github/workflows/on_release.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Creates a docker image for production
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Build started
|
||||
uses: voxmedia/github-action-slack-notify-build@v1
|
||||
if: success()
|
||||
with:
|
||||
channel: ci-notifications
|
||||
status: STARTED
|
||||
color: good
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||
with:
|
||||
images: redbeard/mines-frontend
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||
env:
|
||||
SCOPE: production
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
- name: Build finished
|
||||
if: success()
|
||||
uses: voxmedia/github-action-slack-notify-build@v1
|
||||
with:
|
||||
channel: ci-notifications
|
||||
status: SUCCESS
|
||||
color: good
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
||||
Reference in New Issue
Block a user