mirror of https://github.com/MISP/misp-docker
Push multi-arch images
parent
c5e184f88e
commit
f4ec130176
|
@ -7,24 +7,29 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# checkout the repository in the ubuntu-latest environment
|
- name: Checkout repository
|
||||||
- uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build the Docker images
|
- name: Set up QEMU (for ARM emulation)
|
||||||
env:
|
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
||||||
run: |
|
- name: Set up Docker Buildx
|
||||||
docker compose --env-file template.env build
|
uses: docker/setup-buildx-action@v1
|
||||||
# Tag the image with the commit SHA[0:7]
|
|
||||||
DOCKER_IMG_TAG=`echo "${{ github.sha }}" | cut -c 1-7`
|
- name: Build the Docker images
|
||||||
docker tag ${{ secrets.DOCKER_USERNAME }}/misp-docker:core-latest ${{ secrets.DOCKER_USERNAME }}/misp-docker:core-$DOCKER_IMG_TAG
|
env:
|
||||||
docker tag ${{ secrets.DOCKER_USERNAME }}/misp-docker:modules-latest ${{ secrets.DOCKER_USERNAME }}/misp-docker:modules-$DOCKER_IMG_TAG
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: |
|
||||||
- name: Push the Docker images to Docker Hub
|
docker compose --env-file template.env build --parallel
|
||||||
run: |
|
# Tag the image with the commit SHA[0:7]
|
||||||
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
DOCKER_IMG_TAG=`echo "${{ github.sha }}" | cut -c 1-7`
|
||||||
docker push ${{ secrets.DOCKER_USERNAME }}/misp-docker --all-tags
|
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
|
||||||
|
run: |
|
||||||
|
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||||
|
docker push ${{ secrets.DOCKER_USERNAME }}/misp-docker --all-tags
|
||||||
|
|
Loading…
Reference in New Issue