Merge pull request #24 from Finatext/dependabot/github_actions/action… #58
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: lapper | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '0 0 1 * *' | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
image: | |
name: Image | |
runs-on: ubuntu-22.04 | |
env: | |
IMAGE_NAME: docker.pkg.github.com/finatext/lapper/lapper:beta | |
IMAGE_NAME_LATEST: docker.pkg.github.com/finatext/lapper/lapper:latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 1 | |
- name: Test | |
run: make test | |
- name: Build | |
run: | | |
docker build -t $IMAGE_NAME . | |
docker build -t $IMAGE_NAME_LATEST . | |
- name: Docker Login | |
run: | | |
docker login docker.pkg.github.com -u owner -p ${{ secrets.GITHUB_TOKEN }} | |
- name: Push | |
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' | |
run: | | |
docker push $IMAGE_NAME | |
docker push $IMAGE_NAME_LATEST | |
timeout-minutes: 5 |