Skip to content

docs(readme): update docker #35

docs(readme): update docker

docs(readme): update docker #35

Workflow file for this run

name: Build and Publish Docker Image
on:
push:
branches:
- master
jobs:
dockerbuildpush:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set a datetag variable
run: echo "DATETAG=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
- name: Create image from repository
run: docker build -t ghcr.io/${{ github.actor }}/homeassistant-discord-bot:latest -t ghcr.io/${{ github.actor }}/homeassistant-discord-bot:${{ env.DATETAG }} .
- name: Push image to GitHub Container Registry with date tag
run: docker push ghcr.io/${{ github.actor }}/homeassistant-discord-bot:${{ env.DATETAG }}
- name: Push image to GitHub Container Registry as latest
run: docker push ghcr.io/${{ github.actor }}/homeassistant-discord-bot:latest