|
| 1 | +# |
| 2 | +# Copyright (C) 2023 fiskaly GmbH <https://fiskaly.com> |
| 3 | +# All rights reserved. |
| 4 | +# |
| 5 | +# Developed by: Philipp Paulweber et al. |
| 6 | +# <https://github.com/fiskaly/docker.migrate-postgres/graphs/contributors> |
| 7 | +# |
| 8 | +# This file is part of docker.migrate-postgres. |
| 9 | +# |
| 10 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 11 | +# of this software and associated documentation files (the "Software"), to deal |
| 12 | +# in the Software without restriction, including without limitation the rights |
| 13 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 14 | +# copies of the Software, and to permit persons to whom the Software is |
| 15 | +# furnished to do so, subject to the following conditions: |
| 16 | +# |
| 17 | +# The above copyright notice and this permission notice shall be included in all |
| 18 | +# copies or substantial portions of the Software. |
| 19 | +# |
| 20 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 21 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 22 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 23 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 24 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 25 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 26 | +# SOFTWARE. |
| 27 | + |
| 28 | +# https://help.github.com/en/articles/virtual-environments-for-github-actions |
| 29 | + |
| 30 | +name: release |
| 31 | + |
| 32 | +on: |
| 33 | + push: |
| 34 | + tags: |
| 35 | + - '[0-9]+.[0-9]+.[0-9]+' |
| 36 | + |
| 37 | +env: |
| 38 | + REGISTRY: ghcr.io |
| 39 | + IMAGE_NAME: ${{ github.repository }} |
| 40 | + |
| 41 | +jobs: |
| 42 | + # https://github.com/actions/virtual-environments/blob/main/images/linux |
| 43 | + release: |
| 44 | + runs-on: ubuntu-latest |
| 45 | + # if: github.ref == 'refs/heads/master' |
| 46 | + permissions: |
| 47 | + contents: read |
| 48 | + packages: write |
| 49 | + steps: |
| 50 | + - name: Checkout |
| 51 | + uses: actions/checkout@v3 |
| 52 | + |
| 53 | + - name: Authorization |
| 54 | + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 |
| 55 | + with: |
| 56 | + registry: ${{ env.REGISTRY }} |
| 57 | + username: ${{ github.actor }} |
| 58 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + |
| 60 | + - name: Setup |
| 61 | + id: meta |
| 62 | + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 |
| 63 | + with: |
| 64 | + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
| 65 | + |
| 66 | + - name: Building |
| 67 | + run: | |
| 68 | + make build |
| 69 | +
|
| 70 | + - name: Publish |
| 71 | + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc |
| 72 | + with: |
| 73 | + context: . |
| 74 | + push: true |
| 75 | + tags: ${{ steps.meta.outputs.tags }} |
| 76 | + labels: ${{ steps.meta.outputs.labels }} |
0 commit comments