Skip to content

Commit

Permalink
feat: add docker image with commit name
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Ballier committed Oct 6, 2023
1 parent f2aec59 commit 1bb406b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@ jobs:
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get commit short
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build and push
uses: docker/build-push-action@v5
with:
Expand All @@ -37,4 +44,6 @@ jobs:
push: true
tags: |
ghcr.io/tbmc/sporteasy-calendar-connector:latest
ghcr.io/tbmc/sporteasy-calendar-connector:${{ steps.vars.outputs.sha_short }}
tbmc/sporteasy-calendar-connector:latest
tbmc/sporteasy-calendar-connector:${{ steps.vars.outputs.sha_short }}

0 comments on commit 1bb406b

Please sign in to comment.