|
| 1 | +# Authors: |
| 2 | +# Unai Martinez-Corral |
| 3 | +# Lucas Teske |
| 4 | +# |
| 5 | +# Copyright 2019-2021 Unai Martinez-Corral <[email protected]> |
| 6 | +# |
| 7 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | +# you may not use this file except in compliance with the License. |
| 9 | +# You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, software |
| 14 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +# See the License for the specific language governing permissions and |
| 17 | +# limitations under the License. |
| 18 | +# |
| 19 | +# SPDX-License-Identifier: Apache-2.0 |
| 20 | + |
| 21 | +name: 'apicula' |
| 22 | + |
| 23 | +on: |
| 24 | + pull_request: |
| 25 | + push: |
| 26 | + schedule: |
| 27 | + - cron: '0 0 * * 5' |
| 28 | + workflow_dispatch: |
| 29 | + repository_dispatch: |
| 30 | + types: [ apicula ] |
| 31 | + |
| 32 | +env: |
| 33 | + DOCKER_BUILDKIT: 1 |
| 34 | + |
| 35 | +jobs: |
| 36 | + |
| 37 | + apicula: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + steps: |
| 40 | + |
| 41 | + - uses: actions/checkout@v2 |
| 42 | + with: |
| 43 | + submodules: recursive |
| 44 | + |
| 45 | + - run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH |
| 46 | + |
| 47 | + - run: dockerBuild pkg:apicula apicula pkg |
| 48 | + - run: dockerBuild apicula apicula |
| 49 | + |
| 50 | + - run: dockerTestPkg apicula |
| 51 | + - run: dockerTest apicula |
| 52 | + |
| 53 | + - name: Login to DockerHub |
| 54 | + if: github.event_name != 'pull_request' && github.repository == 'hdl/containers' |
| 55 | + uses: docker/login-action@v1 |
| 56 | + with: |
| 57 | + username: ${{ secrets.DOCKER_USER }} |
| 58 | + password: ${{ secrets.DOCKER_PASS }} |
| 59 | + |
| 60 | + - run: dockerPush pkg:apicula |
| 61 | + if: github.event_name != 'pull_request' && github.repository == 'hdl/containers' |
| 62 | + |
| 63 | + - run: dockerPush apicula |
| 64 | + if: github.event_name != 'pull_request' && github.repository == 'hdl/containers' |
0 commit comments