Skip to content

gh actions

gh actions #1

name: Docker
on:
push:
branches: [ "main" ]
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and push Docker image
run: |
docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_TOKEN
docker buildx create --name mybuilder --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64,linux/arm64 -t grgrlmml/sentrylog:${GITHUB_SHA::7} -t grgrlmml/sentrylog:latest --push .