Skip to content

Commit

Permalink
fix: Use the correct image name casing
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jun 7, 2024
1 parent 9c02930 commit 2afee1e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
CARGO_TERM_COLOR: always
HANDLER_NAME: bender
IMAGE: sierrasoftworks/bender
GH_IMAGE: sierrasoftworks/bender
VERSION: dev

STAGING_DEPLOYMENT_APP_ID: 65d7542d-354d-4129-898c-8848be8d5ecd
STAGING_FUNCTION_NAME: bender-sierrasoftworks-staging
Expand Down Expand Up @@ -44,10 +46,18 @@ jobs:
echo "${{ secrets.DOCKER_HUB }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
- name: Calculate version number
id: version
if: github.event_name == 'push'
run: |
IMAGE_ID=$(echo '${{ github.repository }}/${{ github.event.repository.name }}' | tr '[:upper:]' '[:lower:]')
echo "GH_IMAGE=$IMAGE_ID" >> $GITHUB_ENV
VERSION=$(git describe --tags 2>/dev/null || git rev-parse --short HEAD)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Calculate version number
id: repo
run: |
IMA=$(git describe --tags 2>/dev/null || git rev-parse --short HEAD)
echo "::set-output name=version::$VERSION"
- name: Build and push
Expand All @@ -56,11 +66,11 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
labels: org.opencontainers.image.authors=SierraSoftworks,org.opencontainers.image.version=${{ steps.version.outputs.version }},org.opencontainers.image.revision=${{ github.sha }}
tags: ${{ env.IMAGE }}:latest,${{ env.IMAGE }}:${{ steps.version.outputs.version }},docker.pkg.github.com/${{ github.repository }}/${{ github.event.repository.name }}:latest,docker.pkg.github.com/${{ github.repository }}/${{ github.event.repository.name }}:${{ steps.version.outputs.version }}
labels: org.opencontainers.image.authors=SierraSoftworks,org.opencontainers.image.version=${{ env.VERSION }},org.opencontainers.image.revision=${{ github.sha }}
tags: ${{ env.IMAGE }}:latest,${{ env.IMAGE }}:${{ env.VERSION }},docker.pkg.github.com/${{ env.GH_IMAGE }}:latest,docker.pkg.github.com/${{ env.GH_IMAGE }}:${{ env.VERSION }}

- run: |
docker run --rm -t -v $PWD:/volume ${{ env.IMAGE }}:${{ steps.version.outputs.version }} cp /app/$HANDLER_NAME /volume/handler
docker run --rm -t -v $PWD:/volume ${{ env.IMAGE }}:${{ env.VERSION }} cp /app/$HANDLER_NAME /volume/handler
mv ./handler ./$HANDLER_NAME
- name: Save handler artifact
Expand Down

0 comments on commit 2afee1e

Please sign in to comment.