-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.13 KB
/
docker-image.yml
File metadata and controls
39 lines (37 loc) · 1.13 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
name: Push Docker Image
on:
workflow_call:
inputs:
tag-name:
type: string
description: 'The tag name to use for the image'
required: true
jobs:
push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
push: true
labels: org.opencontainers.image.source = https://github.com/${{ github.repository }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ inputs.tag-name }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: add an Asset(compose.yml) to the Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ inputs.tag-name }} ./deployment/compose.yml --clobber