mirror of https://github.com/MISP/misp-docker
Tag newly created Docker images with the first 8 letters of the commit SHA1 (#6)
Signed-off-by: Sebastiano Mariani <smariani@vmware.com>pull/1/head
parent
185c79a37d
commit
9b2471d267
|
@ -15,9 +15,16 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build the Docker images
|
- name: Build the Docker images
|
||||||
run: docker compose --file build-docker-compose.yml --env-file template.env build
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: |
|
||||||
|
docker compose --file build-docker-compose.yml --env-file template.env build
|
||||||
|
# Tag the image with the commit SHA[0:7]
|
||||||
|
DOCKER_IMG_TAG=`echo "${{ github.event.pull_request.head.sha }}" | cut -c 1-7`
|
||||||
|
docker tag ${{ secrets.DOCKER_USERNAME }}/misp-docker:core-latest ${{ secrets.DOCKER_USERNAME }}/misp-docker:core-$DOCKER_IMG_TAG
|
||||||
|
docker tag ${{ secrets.DOCKER_USERNAME }}/misp-docker:modules-latest ${{ secrets.DOCKER_USERNAME }}/misp-docker:modules-$DOCKER_IMG_TAG
|
||||||
|
|
||||||
- name: Push the Docker images to Docker Hub
|
- name: Push the Docker images to Docker Hub
|
||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||||
docker compose -f build-docker-compose.yml push
|
docker push ${{ secrets.DOCKER_USERNAME }}/misp-docker --all-tags
|
||||||
|
|
Loading…
Reference in New Issue