Skip to content

fix: Add GitHub action #5

fix: Add GitHub action

fix: Add GitHub action #5

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Build with Maven
run: |
cd test-services
mvn clean install -DskipTests=true
- uses: actions/checkout@v3
- name: Build the Docker image
run: |
cd test-services
docker build . --file Dockerfile --tag ghcr.io/vsds/testbed-service:1.0.0
docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@v3
- name: Build the Docker image
run: |
cd test-services
docker push ghcr.io/vsds/testbed-service:1.0.0