This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues or pull requests.
currency-exchange-rust/.github/workflows/main.yml

43 lines
945 B
YAML

name: Publish Docker Image
on:
push:
branches:
- 'master'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build app
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
docker:
needs: ["tests"]
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: materus/currency-exchange:latest