-
-
Notifications
You must be signed in to change notification settings - Fork 34
29 lines (27 loc) · 832 Bytes
/
gcr.yml
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
name: Github-Container Build & Push
#on:
# push:
# branches:
# - main
# Controls when the action will run.
on:
# Triggers the workflow when a release is created
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
dockerloginbuildpush:
runs-on: ubuntu-latest
steps:
- name: login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- uses: actions/checkout@v4
- name: create image from repository
run: docker build -t ghcr.io/${{ github.actor }}/hiphp .
- name: push image to GitHub Container Registry
run: docker push ghcr.io/${{ github.actor }}/hiphp:latest