Skip to content

Commit

Permalink
Merge pull request #52 from brccabral/actions
Browse files Browse the repository at this point in the history
Github Actions that builds linux/amd64 and linux/arm64
  • Loading branch information
iamluc committed Jun 19, 2024
2 parents 02fe298 + 5055b54 commit c6ed59a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/DockerHub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Push Docker images to Docker Hub

on: push
jobs:
build_job:
name: Build and push
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- 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: Run Buildx and push image
run: |
docker buildx create --use --name multi-arch-builder --platform "linux/arm64,linux/amd64"
docker buildx build --platform "linux/arm64,linux/amd64" --tag ${{ secrets.DOCKERHUB_USERNAME }}/docker-hostmanager:0.0.4 --file Dockerfile --output type=image,push=true .
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM iamluc/composer
FROM composer:1.4.3

ADD . /usr/local/src/docker-hostmanager

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "iamluc/docker-hostmanager",
"license": "MIT",
"version": "0.0.4",
"type": "project",
"description": "Update /etc/hosts to access running containers",
"keywords": ["docker", "hosts"],
Expand Down

0 comments on commit c6ed59a

Please sign in to comment.