Skip to content

Commit

Permalink
Slug version of branch for tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsarm committed Apr 17, 2024
1 parent 99fd0c9 commit c684d49
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
run: ./docker-build.sh "${GITHUB_REF#refs/heads/}"
run: ./docker-build.sh "${GITHUB_REF_SLUG}"
- name: Run tests
run: docker run --rm -e PROCESS_TYPE=test --name django-coleman "mrsarm/django-coleman:${GITHUB_REF#refs/heads/}"
run: docker run --rm -e PROCESS_TYPE=test --name django-coleman "mrsarm/django-coleman:${GITHUB_REF_SLUG}"
- name: Push Docker image
run: docker push "mrsarm/django-coleman:${GITHUB_REF#refs/heads/}"
run: docker push "mrsarm/django-coleman:${GITHUB_REF_SLUG}"

0 comments on commit c684d49

Please sign in to comment.