Added auto upgrade of TimescaleDB extension #44
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
# This is a basic workflow to help you get started with Actions | |
name: Docker Image | |
# Controls when the action will run. | |
on: | |
# When a release is published | |
release: | |
types: [published] | |
# Push excluding tags and workflow changes | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '*.*' | |
paths-ignore: | |
- '**/*.md' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
image_postgresql: | |
env: | |
PLATFORM: linux/amd64,linux/aarch64 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Set tags | |
run: | | |
if [ -z "$TAG" ]; then | |
echo "TAG=-t openremote/postgresql:develop" >> $GITHUB_ENV | |
else | |
echo "TAG=-t openremote/postgresql:latest -t openremote/postgresql:$TAG" >> $GITHUB_ENV | |
fi | |
env: | |
TAG: ${{ github.event.release.tag_name }} | |
- uses: actions/checkout@v2 | |
- name: set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
with: | |
platforms: all | |
- name: install buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
with: | |
version: latest | |
install: true | |
- name: available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets._TEMP_DOCKERHUB_USER }} | |
password: ${{ secrets._TEMP_DOCKERHUB_PASSWORD }} | |
- name: build and push images | |
run: | | |
docker build --build-arg GIT_COMMIT=${{ github.sha }} --push --platform $PLATFORM $TAG . |