-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (40 loc) · 1.47 KB
/
publish.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
name: Publish Docker image
permissions:
contents: read
on:
push:
tags:
- 'latest'
jobs:
push_to_registry:
name: Push Docker image to Docker hub
runs-on: ubuntu-latest
environment:
name: Build Docker images
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_REPOSITORY_LOGIN }}
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
- name: Build action image
run: make docker-build
env:
IMAGE_TAG: "docker.io/botsudo/action-docker-compose:latest"
PLATFORM: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
ACTION: push
- name: Sign and push docker image
uses: sudo-bot/action-docker-sign@latest
with:
image-ref: "docker.io/botsudo/action-docker-compose:latest"
# Sign the manifest
sign-manifest: true
# Required to sign the manifest
notary-auth: "${{ secrets.DOCKER_REPOSITORY_LOGIN }}:${{ secrets.DOCKER_REPOSITORY_PASSWORD }}"
private-key-id: "${{ vars.DOCKER_PRIVATE_KEY_ID }}"
private-key: ${{ secrets.DOCKER_PRIVATE_KEY }}
private-key-passphrase: ${{ secrets.DOCKER_PRIVATE_KEY_PASSPHRASE }}
private-key-name: "${{ vars.DOCKER_PRIVATE_KEY_NAME }}"