gh actions #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |