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
Raw Permalink Normal View History

2024-03-16 00:05:41 +01:00
name: Publish Docker Image
on:
push:
branches:
- 'master'
jobs:
2024-03-16 00:12:15 +01:00
tests:
runs-on: ubuntu-latest
steps:
2024-03-18 15:47:50 +01:00
- uses: actions/checkout@v4
2024-03-16 00:13:48 +01:00
- name: Build app
run: cargo build --verbose
2024-03-16 00:12:15 +01:00
- name: Run tests
run: cargo test --verbose
2024-03-16 00:05:41 +01:00
docker:
2024-03-16 00:12:15 +01:00
needs: ["tests"]
2024-03-16 00:05:41 +01:00
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