2021-03-14 00:00:43 +01:00
|
|
|
name: Publish API image
|
|
|
|
on:
|
2021-10-08 15:16:57 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- v3
|
|
|
|
paths:
|
|
|
|
- api/**
|
2021-03-14 01:00:15 +01:00
|
|
|
|
2021-03-14 00:00:43 +01:00
|
|
|
jobs:
|
2021-10-08 15:16:57 +02:00
|
|
|
push_to_registry:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Build and Push Docker image to Github Packages
|
|
|
|
steps:
|
|
|
|
- name: Check out repo
|
2023-04-02 10:13:19 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-10-08 15:16:57 +02:00
|
|
|
- name: Login to GitHub registry
|
2023-04-02 10:13:19 +02:00
|
|
|
uses: docker/login-action@v2
|
2021-10-08 15:16:57 +02:00
|
|
|
with:
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
registry: docker.pkg.github.com
|
|
|
|
- name: Login to ghcr.io
|
2023-04-02 10:13:19 +02:00
|
|
|
uses: docker/login-action@v2
|
2021-10-08 15:16:57 +02:00
|
|
|
with:
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
registry: ghcr.io
|
2021-03-14 00:18:37 +01:00
|
|
|
|
2021-10-08 15:16:57 +02:00
|
|
|
- name: Build and push API
|
2023-04-02 10:13:19 +02:00
|
|
|
uses: docker/build-push-action@v4
|
2021-10-08 15:16:57 +02:00
|
|
|
with:
|
|
|
|
context: api
|
|
|
|
push: true
|
|
|
|
pull: true
|
|
|
|
tags: |
|
|
|
|
docker.pkg.github.com/engineer-man/piston/api
|
|
|
|
ghcr.io/engineer-man/piston
|