-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.78 KB
/
docker-publish-on-release.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
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
name: Publish Docker Image on Release
on:
release:
types:
- published
permissions:
contents: read
packages: write
jobs:
build-and-push:
name: Build and Push Multi-Platform Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/#-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Set Lowercase Repository Info
id: repo_info
run: |
echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "REPO_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and Push Multi-Platform Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:latest
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ github.event.release.tag_name }}
labels: |
org.opencontainers.image.title=fortsphere
org.opencontainers.image.description="Fortify your digital sphere, one command at a time."
org.opencontainers.image.url=https://github.com/OpenPathfinder/fortSphere
org.opencontainers.image.source=https://github.com/OpenPathfinder/fortSphere.git
org.opencontainers.image.version=${{ github.event.release.tag_name }}
org.opencontainers.image.licenses=MIT
maintainer="Ulises Gascón <ulises@linux.com>"