Skip to content

Commit

Permalink
Merge pull request #163 from MaRDI4NFDI/energy
Browse files Browse the repository at this point in the history
Measure energy impact to build base container
  • Loading branch information
physikerwelt authored Oct 7, 2024
2 parents 37c3868 + 2a3a59a commit a5882c3
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@ jobs:
contents: read
packages: write
steps:
- name: Start Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v3 # use hash or @vX here (See note below)
with:
task: start-measurement
- name: Checkout
uses: actions/checkout@v4.1.6
- name: Checkout Repo Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v3 # use hash or @vX here (See note below)
with:
task: get-measurement
label: 'repo checkout'
- name: Log in to the Container registry
uses: docker/login-action@v3.2.0
with:
Expand All @@ -46,6 +55,18 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v3 # use hash or @vX here (See note below)
with:
task: get-measurement
label: 'build and push'
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@v3 # use hash or @vX here (See note below)
with:
task: display-results
# continue-on-error: true # recommended setting for production. See notes below.


build-dev:
runs-on: ubuntu-latest
permissions:
Expand All @@ -71,6 +92,8 @@ jobs:
tags: ghcr.io/mardi4nfdi/docker-wikibase:dev
cache-from: type=gha
cache-to: type=gha,mode=max


build-jobrunner:
runs-on: ubuntu-latest
permissions:
Expand All @@ -95,7 +118,9 @@ jobs:
push: ${{ env.PUSH_IMAGE }}
tags: ghcr.io/mardi4nfdi/docker-redis-jobrunner
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max


build-backup:
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit a5882c3

Please sign in to comment.