Skip to content

Commit

Permalink
gha
Browse files Browse the repository at this point in the history
  • Loading branch information
karankohli-cf committed Sep 22, 2023
1 parent 69b1092 commit 0a82d2f
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 49 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Create and publish a Docker image

on:
release:
types: [published]
# publish on pushes to the main branch (image tagged as "latest")
push:
branches:
- "*"
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
48 changes: 0 additions & 48 deletions .github/workflows/release.yaml

This file was deleted.

12 changes: 11 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,30 @@ module github.com/ossf/allstar
go 1.16

require (
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Masterminds/semver/v3 v3.2.1
github.com/aws/aws-sdk-go-v2/service/ecr v1.17.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.13.5 // indirect
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220517224237-e6f29200ae04 // indirect
github.com/bradleyfalzon/ghinstallation/v2 v2.4.0
github.com/chrismellard/docker-credential-acr-env v0.0.0-20220327082430-c57b701bfc08 // indirect
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible
github.com/go-training/helloworld v0.0.0-20200225145412-ba5f4379d78b // indirect
github.com/gobwas/glob v0.2.3
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v50 v50.2.0
github.com/google/ko v0.14.1 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/matryer/is v1.4.0 // indirect
github.com/ossf/scorecard/v4 v4.10.5
github.com/rhysd/actionlint v1.6.24
github.com/rs/zerolog v1.29.1
github.com/shurcooL/githubv4 v0.0.0-20210725200734-83ba7b4c9228
github.com/sigstore/cosign/v2 v2.0.3-0.20230523133326-0544abd8fc8a // indirect
github.com/sigstore/rekor v1.2.0 // indirect
github.com/spf13/viper v1.16.0 // indirect
gocloud.dev v0.34.0
golang.org/x/sync v0.3.0
sigs.k8s.io/kind v0.20.0 // indirect
sigs.k8s.io/yaml v1.3.0
)

0 comments on commit 0a82d2f

Please sign in to comment.