Skip to content

Commit

Permalink
Add Docker login
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <www@scholzj.com>
  • Loading branch information
scholzj committed Dec 7, 2023
1 parent d271d81 commit 5333f93
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ on:
push:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

env:
DOCKER_REGISTRY: ghcr.io
DOCKER_ORG: scholzj
DOCKER_TAG: latest

# strategy:
# fail-fast: false
# matrix:
Expand Down Expand Up @@ -40,17 +46,32 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

# Setup Docker credentials
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

# Build the Java project
- name: Build the Java project
run: make build

# Build the Container images
- name: Build and push the containers for amd64
run: DOCKER_ARCHITECTURE=amd64 make docker_build docker_push docker_amend_manifest
run: make docker_build docker_push docker_amend_manifest
env:
DOCKER_ARCHITECTURE: amd64
# with:
# architecture: ${{ matrix.language }}
- name: Build and push the containers for arm64
run: DOCKER_ARCHITECTURE=arm64 make docker_build docker_push docker_amend_manifest
run: make docker_build docker_push docker_amend_manifest
env:
DOCKER_ARCHITECTURE: arm64

# Push the container manifest
- name: Push the container manifest
Expand Down

0 comments on commit 5333f93

Please sign in to comment.