Skip to content

Commit

Permalink
GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
bcollard committed Mar 4, 2024
1 parent dc022f1 commit 4be4fcf
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
name: Docker Image CI
name: docker-build-push

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
push

jobs:

build:

docker-build-push:
runs-on: ubuntu-latest

steps:
- 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 the Docker image
run: docker build . --file Dockerfile --tag pileenretard/busybox:1.1
- name: push the docker image
run: docker push pileenretard/busybox:1.1
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- 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.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/busybox:1.1

0 comments on commit 4be4fcf

Please sign in to comment.