Skip to content

Commit

Permalink
Merge pull request #38 from almaslennikov/lowercase-repo-name
Browse files Browse the repository at this point in the history
Lowercase repo name in GH actions to avoid errors
  • Loading branch information
almaslennikov committed Feb 6, 2024
2 parents 78454d4 + 5610764 commit 428715a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/image-push-master.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: "push images on merge to master"

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

on:
push:
branches:
Expand All @@ -12,6 +9,9 @@ jobs:
name: image push
runs-on: ubuntu-22.04
steps:
- name: Set repository as lower-case output variable
id: repo_name
run: echo ::set-output name=repository::$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
- name: check out the repo
uses: actions/checkout@v3

Expand All @@ -32,6 +32,6 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64,linux/ppc64le
tags: |
${{ env.IMAGE_NAME }}
${{ env.IMAGE_NAME }}:${{ github.sha }}
ghcr.io/${{ steps.repo_name.outputs.repository }}
ghcr.io/${{ steps.repo_name.outputs.repository }}:${{ github.sha }}
file: ./Dockerfile
11 changes: 6 additions & 5 deletions .github/workflows/image-push-release.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: "push images on release"

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

on:
push:
tags:
- v*
jobs:
build-and-push-ipoib-cni:
runs-on: ubuntu-22.04
name: image push AMD64
name: image push
steps:
- name: Set repository as lower-case output variable
id: repo_name
run: echo ::set-output name=repository::$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')

- name: check out the repo
uses: actions/checkout@v3

Expand All @@ -29,7 +30,7 @@ jobs:
id: docker_meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE_NAME }}
images: ghcr.io/${{ steps.repo_name.outputs.repository }}
tags: |
type=ref,event=tag
Expand Down

0 comments on commit 428715a

Please sign in to comment.