-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 960 Bytes
/
deploy_ghcr.yaml
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
name: deploy_ghcr
on:
workflow_call:
inputs:
file:
required: true
type: string
context:
required: true
type: string
name:
required: true
type: string
jobs:
push-store-image:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@main
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: "Build Inventory Image"
run: |
owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build ${{ inputs.context }} -f ${{ inputs.file }} --tag ghcr.io/$owner/fediverse/${{ inputs.name }}:latest
docker push ghcr.io/$owner/fediverse/${{ inputs.name }}:latest