forked from engineer-man/piston
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.23 KB
/
api-push.yaml
File metadata and controls
41 lines (37 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish API image
on:
workflow_dispatch:
push:
branches:
- master
- v3
paths:
- api/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
push_to_registry:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
name: Build and Push Docker image to Github Packages
steps:
- name: Check out repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Login to ghcr.io
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Build and push API
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
context: api
push: true
pull: true
tags: |
ghcr.io/codize-dev/piston:latest
ghcr.io/codize-dev/piston:${{ github.sha }}