Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
Added workflow
  • Loading branch information
midwan committed Oct 24, 2023
1 parent fb579f1 commit 6325a47
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker Image CI

on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0 * * *'

jobs:

push_to_registry:
name: Build and push Docker images to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Buster Docker image
uses: docker/build-push-action@v5.0.0
with:
build-args: "debian_release=buster"
context: .
file: ./Dockerfile
push: true
tags: "midwan/amiberry-debian-aarch64:buster"

- name: Build and push Bullseye Docker image
uses: docker/build-push-action@v5.0.0
with:
build-args: "debian_release=bullseye"
context: .
file: ./Dockerfile
push: true
tags: "midwan/amiberry-debian-aarch64:bullseye"

- name: Build and push Bookworm Docker image
uses: docker/build-push-action@v5.0.0
with:
build-args: "debian_release=bookworm"
context: .
file: ./Dockerfile
push: true
tags: "midwan/amiberry-debian-aarch64:bookworm, midwan/amiberry-debian-aarch64:latest"

0 comments on commit 6325a47

Please sign in to comment.