Docker PostgreSQL pl/java CI #200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker PostgreSQL pl/java CI | |
on: | |
push: | |
branches: | |
- 'main' | |
schedule: | |
- cron: '15 5 * * *' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-and-push-docker-images: | |
name: Build and push docker images for PostgreSQL + extensions | |
runs-on: ubuntu-22.04 | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install ansible and docker sources | |
run: /usr/bin/sudo /usr/bin/cp build-resources/apt/sources.list.d/* /etc/apt/sources.list.d | |
- name: Install ansible and docker keyrings | |
run: /usr/bin/sudo /usr/bin/cp build-resources/keyrings/* /usr/share/keyrings | |
- name: Run apt-update | |
run: /usr/bin/sudo /usr/bin/apt-get update | |
- name: Install ansible and docker-ce | |
run: /usr/bin/sudo /usr/bin/apt-get install -y ansible ansible-core docker-ce docker-compose-plugin | |
- name: Install ansible collections (does not require root) | |
run: /usr/bin/ansible-galaxy install -r src/main/ansible/roles/requirements.yml | |
- name: Build and push docker images | |
run: /usr/bin/ansible-playbook src/main/ansible/build.yml |