Skip to content

Commit

Permalink
Merge pull request #53 from cybertec-postgresql/action_check_packages
Browse files Browse the repository at this point in the history
add new action
  • Loading branch information
Schmaetz authored Sep 2, 2024
2 parents 67873dd + e9abbd1 commit 77ce92e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/check_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Check Dependencies for Postgis and store it in container-build-file

on:
# merge:
# branches:
# - action_check_packages
workflow_dispatch: # Manuelles Auslösen des Workflows

jobs:
run-in-container:
runs-on: rocky-latest

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

- name: Set up Docker
uses: docker/setup-buildx-action@v2

- name: Pull Docker image
run: docker pull docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-34-1

- name: Run commands in Docker container
id: run_commands
run: |
# Create Container
container_id=$(docker run -d docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-34-1 sleep infinity)
# Get Package-Version for postgis-dependencies
proj=$(docker exec "$container_id" /usr/proj94/bin/proj --version 2>&1 | head -n 1 )
# Write infos into txt
echo "$proj" > output.txt
# Stop and remove Container
docker stop "$container_id"
docker rm "$container_id"
- name: Display results
run: cat output.txt

# - name: Save output to the repository
# run: |
# mv output.txt results.txt
# git config --local user.name "github-actions"
# git config --local user.email "[email protected]"
# git add results.txt
# git commit -m "Save results from Docker container"
# git push

0 comments on commit 77ce92e

Please sign in to comment.