Skip to content

Add username

Add username #23

name: Docker build and push
on:
push:
branches:
- 'main'
tags:
- '*.*.*'
pull_request:
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push git hash
uses: docker/build-push-action@v5
with:
push: true
secrets: |
"ozgrav_repo_token=${{ secrets.OZGRAV_REPO_TOKEN }}"
tags: nickswainston/meerpipe:${{ github.sha }}
-
name: Build and push latest
uses: docker/build-push-action@v5
with:
push: true
secrets: |
"ozgrav_repo_token=${{ secrets.OZGRAV_REPO_TOKEN }}"
tags: nickswainston/meerpipe:latest
-
name: Build and push release
uses: docker/build-push-action@v5
if: github.event_name == 'release'
with:
push: true
build-args: "OZGRAV_REPO_TOKEN=${{ secrets.OZGRAV_REPO_TOKEN }}"
tags: nickswainston/meerpipe:${{ github.ref_name }}