updated actions #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [ "6", "6.0","6.0.6", "6.0.10", "6.0.12", "6.0.13", "7", "7.0", "7.0.5" ] | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to GitHub container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
tags: i15s/mongo:${{ matrix.version }} | |
push: true | |
build-args: | | |
VERSION=${{ matrix.version }} | |
- name: Push image to GitHub container registry | |
run: | | |
docker buildx imagetools create \ | |
--tag ghcr.io/instant-solutions/mongo:${{ matrix.version }} \ | |
i15s/mongo:${{ matrix.version }} |