Merge pull request #1 from cron-eu/mysql-8.0 #4
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: "Deploy Image to DockerHub" | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# Build a docker image for a specific version and using a given target | |
build_and_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout Sourcecode" | |
uses: actions/checkout@v2 | |
- name: "Set up Docker Buildx" | |
id: builder | |
uses: docker/setup-buildx-action@v1 | |
- name: "Append ARM buildx builder from AWS" | |
uses: baschny/append-buildx-action@v1 | |
with: | |
builder: ${{ steps.builder.outputs.name }} | |
endpoint: "ssh://ec2-user@arm.d.cron.eu" | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: "Cache Docker layers" | |
uses: actions/cache@v2 | |
with: | |
path: .buildx-cache | |
key: ${{ runner.os }}-buildx-${{ matrix.mariadb-version }}-${{ github.sha }} | |
restore-keys: | | |
"${{ runner.os }}-buildx-${{ matrix.mariadb-version }}-" | |
"${{ runner.os }}-buildx-" | |
- name: "Login to DockerHub" | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: "Docker build and push" | |
run: make build BUILDX_OPTIONS=--push | |
- name: "Update Docker Hub Description (croneu/phpapp-db)" | |
uses: peter-evans/dockerhub-description@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# Note: the "TOKEN" does not work for the docker hub API yet, see | |
# https://github.com/peter-evans/dockerhub-description/issues/10 | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
repository: croneu/phpapp-db | |
short-description: ${{ github.event.repository.description }} |