Skip to content

Commit

Permalink
Update workflows for api-dings and debug-dings
Browse files Browse the repository at this point in the history
  • Loading branch information
Starefossen committed Oct 16, 2023
1 parent d87176c commit a44596c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/apidings-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: api-dings main

on:
push:
branches:
- main
paths:
- 'api-dings/**'
- .github/workflows/apidings-ci.yaml
- api-dings/**

env:
IMAGE: ghcr.io/${{ github.repository }}:${{ github.sha }}
Expand All @@ -17,7 +16,6 @@ defaults:
jobs:
build:
name: Build and push Docker container
if: "github.ref == 'refs/heads/main'"
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
Expand Down Expand Up @@ -49,13 +47,19 @@ jobs:

- name: Login to GitHub Docker Registry
uses: docker/login-action@v1
if: "github.ref == 'refs/heads/main'"
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build an push the Docker image

- name: Build Docker image
run: |
docker build --pull --tag ${IMAGE} .
- name: Push Docker image
if: "github.ref == 'refs/heads/main'"
run: |
docker push ${IMAGE}
deploy-dev-gcp:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/debugdings-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,31 @@ jobs:

- name: Login to GitHub Docker Registry
uses: docker/login-action@v1
if: "github.ref == 'refs/heads/main'"
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build an push the Docker image

- name: Build Docker image
run: |
docker build --pull --tag ${IMAGE} .
- name: Push Docker image
if: "github.ref == 'refs/heads/main'"
run: |
docker push ${IMAGE}
- name: 'Authenticate to Google Cloud'
id: 'google'
uses: 'google-github-actions/auth@v1'
if: "github.ref == 'refs/heads/main'"
with:
credentials_json: ${{ secrets.SALSA_CREDENTIALS }}

- name: NAIS SLSA Provenance Action
uses: nais/salsa-action@v0.0.1-beta
if: "github.ref == 'refs/heads/main'"
with:
ecosystem: 'gradle'
image: ${{ env.IMAGE }}
Expand Down

0 comments on commit a44596c

Please sign in to comment.