Skip to content

Commit b55a1fa

Browse files
authored
Merge pull request #2 from veesix-networks/dockerhub
dockerhub workflow
2 parents bcbd706 + 0e577bf commit b55a1fa

File tree

1 file changed

+8
-29
lines changed

1 file changed

+8
-29
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,27 @@
1-
name: Create and publish RADIUS Producer Docker image
1+
name: Create and publish Consumer Docker image
22

33
on:
44
release:
55
types: [created]
66

7-
env:
8-
REGISTRY: ghcr.io
9-
IMAGE_NAME: ${{ github.repository }}
10-
117
jobs:
128
build:
139
runs-on: ubuntu-latest
14-
permissions:
15-
contents: read
16-
packages: write
17-
attestations: write
18-
id-token: write
1910
steps:
2011
- name: Checkout repository
2112
uses: actions/checkout@v4
22-
- name: Log in to the Container registry
23-
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
24-
with:
25-
registry: ${{ env.REGISTRY }}
26-
username: ${{ github.actor }}
27-
password: ${{ secrets.GITHUB_TOKEN }}
28-
- name: Extract metadata (tags, labels) for Docker
29-
id: meta
30-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
13+
- name: Log in to Docker Hub
14+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
3115
with:
32-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
16+
username: ${{ secrets.DOCKER_USERNAME }}
17+
password: ${{ secrets.DOCKER_PASSWORD }}
3318
- name: Build and push Docker image
3419
id: push
3520
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
3621
with:
3722
context: .
3823
push: true
3924
tags: |
40-
${{ steps.meta.outputs.tags }}
41-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
42-
labels: ${{ steps.meta.outputs.labels }}
43-
- name: Generate artifact attestation
44-
uses: actions/attest-build-provenance@v2
45-
with:
46-
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
47-
subject-digest: ${{ steps.push.outputs.digest }}
48-
push-to-registry: true
25+
${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.sha }}
26+
${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.event.release.tag_name }}
27+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)