Skip to content

Commit 02678a1

Browse files
committed
Finish deploy step
1 parent 15cc46f commit 02678a1

1 file changed

Lines changed: 38 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,45 @@ jobs:
5656
uses: actions/deploy-pages@v4
5757

5858
dockerhub-release:
59-
# compile the docker image
60-
# push to dockerhub
61-
# log the url of the dockerhub repo here (https://hub.docker.com/repository/docker/theartcher/designpatternpedia)
6259
name: Compile and Push Docker Image
60+
runs-on: ubuntu-latest
61+
permissions:
62+
packages: write
63+
contents: read
64+
attestations: write
65+
id-token: write
66+
steps:
67+
- name: Check out the repo
68+
uses: actions/checkout@v5
69+
70+
- name: Log in to Docker Hub
71+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
72+
with:
73+
username: ${{ secrets.DOCKER_USERNAME }}
74+
password: ${{ secrets.DOCKER_PASSWORD }}
75+
76+
- name: Extract metadata (tags, labels) for Docker
77+
id: meta
78+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
79+
with:
80+
images: ${{ secrets.DOCKER_USERNAME }}/designpatternpedia
81+
82+
- name: Build and push Docker image
83+
id: push
84+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
85+
with:
86+
context: .
87+
file: ./Dockerfile
88+
push: true
89+
tags: ${{ steps.meta.outputs.tags }}
90+
labels: ${{ steps.meta.outputs.labels }}
91+
92+
- name: Generate artifact attestation
93+
uses: actions/attest-build-provenance@v3
94+
with:
95+
subject-name: index.docker.io/${{ secrets.DOCKER_USERNAME }}/designpatternpedia
96+
subject-digest: ${{ steps.push.outputs.digest }}
97+
push-to-registry: true
6398

6499
lighthouse:
65100
name: Lighthouse

0 commit comments

Comments
 (0)