Skip to content

Commit 0d88595

Browse files
Push pkg (#19)
* push pkg during build * push for each branch * get the branch via gh context * correct substitution * login to docker registry and pin deps * syntax fix * always set dev tag
1 parent 3eadf44 commit 0d88595

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/docker.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request: {}
78

89
permissions: {}
910

@@ -22,15 +23,21 @@ jobs:
2223
steps:
2324
- name: Checkout repository
2425
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
- name: Login to GitHub Container Registry
27+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
2532
- name: Build and push image
2633
id: push
27-
uses: docker/build-push-action@v6.15.0
34+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
2835
with:
2936
context: .
3037
push: true
31-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
38+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
3239
- name: Attest
33-
uses: actions/attest-build-provenance@v2
40+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v 2.2.3
3441
id: attest
3542
with:
3643
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
REPOSITORY ?= github/artifact-attestations-opa-provider
1+
REPOSITORY ?= ghcr.io/github/artifact-attestations-opa-provider
22
TAG ?= dev
33
IMG := $(REPOSITORY):$(TAG)
44

charts/artifact-attestations-opa-provider/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
serviceAccountName: {{ .Values.serviceAccount }}
2020
automountServiceAccountToken: true
2121
containers:
22-
- image: github/artifact-attestations-opa-provider:dev
22+
- image: ghcr.io/github/artifact-attestations-opa-provider:dev
2323
imagePullPolicy: IfNotPresent
2424
name: artifact-attestations-opa-provider
2525
securityContext:

0 commit comments

Comments
 (0)