Skip to content

Workflow file for this run

name: Test docker image
on:
push:
branches-ignore:
- "main"
pull_request:
branches-ignore:
- "main"
env:
GH_TOKEN: ${{ secrets.token }}
DISCORD: ${{ secrets.discord_webhook }}
jobs:
test:
name: Test docker image
runs-on: ubuntu-latest
container: docker:stable
steps:
- name: Checkout ${{ github.repository }} repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
token: ${{ env.GH_TOKEN }}
- name: Build dockerfile
run: docker build -t vagrant -f Dockerfile .
notify_on_success:
name: Send notification on success
needs:
- test
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- name: Send notification
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ env.DISCORD }}
description: "Successfully test docker image!"
notify_on_failure:
name: Send notification on failure
needs:
- test
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Send notification
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ env.DISCORD }}
status: failure
description: "Failed to test docker image!"