Update deps #53
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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Build docker: | |
- name: Build named dockerfile | |
run: docker build . --tag wemake-services/wemake-dind:latest | |
- name: Test docker build | |
run: | | |
docker run \ | |
-v $PWD/test/sh:/build/test.sh \ | |
--rm wemake-services/wemake-dind:latest \ | |
sh /build/test.sh | |
deploy: | |
if: "github.event_name == 'push' && github.repository == 'wemake-services/wemake-dind'" | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: wemakeservices/wemake-dind | |
flavor: latest=true | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |