Skip to content

Commit

Permalink
Create docker-buildpush.yml
Browse files Browse the repository at this point in the history
Signed-off-by: ArthurMitchell42 <[email protected]>
  • Loading branch information
ArthurMitchell42 authored Dec 10, 2023
1 parent 9847eff commit 1f9adb7
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker-buildpush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
# pull_request:
# branches: [ "main" ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: kronos443/nutcase

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
run: docker buildx build --platform linux/amd64,linux/arm64/v8,linux/arm/v7 --file Dockerfile --tag kronos443/nutcase:$(date +%s) --push .

0 comments on commit 1f9adb7

Please sign in to comment.