Skip to content

Fix github auth

Fix github auth #7

Workflow file for this run

name: ci
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Configure Maven settings
run: |
mkdir -p ~/.m2
echo "<settings>
<servers>
<server>
<id>github</id>
<username>${{ secrets.GITHUB_USERNAME }}</username>
<password>${{ secrets.GITHUB_TOKEN }}</password>
</server>
</servers>
</settings>" > ~/.m2/settings.xml
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: joachimprinzbach/control-plane-demo:v0.1.0-${{ github.sha }}