Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
verovaleros authored Apr 19, 2024
1 parent 910c6ca commit dd0668b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docker Image CI

on:
push:
branches: [ main ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Docker Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: |
${{ secrets.DOCKER_USER }}/number_anomaly_detector
flavor: |
latest=true
tags: |
type=sha
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
push: true

- name: Webhook to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.

0 comments on commit dd0668b

Please sign in to comment.