Skip to content

Commit

Permalink
Merge pull request #2 from JacobusXIII/build_and_publish
Browse files Browse the repository at this point in the history
Configure build and publish using GitHub Actions
  • Loading branch information
SerhatG authored Sep 26, 2024
2 parents d405390 + a7bc1aa commit e18c8ee
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Docker image

on:
push:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Get project version
id: get_project_version
run: |
VERSION=$(<VERSION)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- if: github.event_name == 'release' || endsWith(steps.get_project_version.outputs.version, '-SNAPSHOT')
name: Login to AERIUS Container Registry
uses: docker/login-action@v1
with:
registry: nexus-docker.aerius.nl
username: ${{ secrets.nexus_username }}
password: ${{ secrets.nexus_password }}
- if: github.event_name == 'release' || endsWith(steps.get_project_version.outputs.version, '-SNAPSHOT')
name: Build and push images
run: |
export DOCKER_REGISTRY_URL=nexus-docker.aerius.nl
echo '### Generating Dockerfiles ### '
./update.sh
echo '### Building and pushing images ### '
PUSH_IMAGES=true ./build_images.sh

0 comments on commit e18c8ee

Please sign in to comment.