-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 2.17 KB
/
deploy.yml
File metadata and controls
78 lines (66 loc) · 2.17 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI / Deploy to GHCR
on:
push:
tags:
- '*'
workflow_dispatch:
env:
USERNAME: ${{ github.repository_owner }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
packages: write
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
name: Deploy
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Install Cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad #v4.0.0
with:
cosign-release: 'v2.1.1'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Login to the Registry
uses: docker/login-action@v3.7.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}
- name: Extract Metadata for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
latest
edge
labels: |
org.opencontainers.image.title=develop-actions
org.opencontainers.image.vendor=Vedansh
org.opencontainers.image.source=https://github.com/offensive-vk/develop-actions/
- name: Build and Push Docker Image
uses: docker/build-push-action@v7
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Upload Labels and Tags
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "## Summary - Docker CI " >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta.outputs.tags }} " >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta.outputs.labels }} " >> $GITHUB_STEP_SUMMARY
echo "*** VERIFICATION COMPLETED ***"