-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (26 loc) · 985 Bytes
/
internal.yml
File metadata and controls
31 lines (26 loc) · 985 Bytes
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
name: internal
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-push-to-ghcr:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v2
- name: Build the Docker Image
run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository_owner }}/codexa:${{ github.sha }} --tag ghcr.io/${{ github.repository_owner }}/codexa:latest
- name: Login to GitHub Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the Docker Image to GitHub Container Registry
if: github.event_name == 'push'
run: docker push ghcr.io/${{ github.repository_owner }}/codexa:${{ github.sha }} && docker push ghcr.io/${{ github.repository_owner }}/codexa:latest