-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.42 KB
/
check_packages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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: ubuntu-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