Skip to content

Commit 47b9b6e

Browse files
authored
Use ubuntu-20.04 for the CI pipeline (#57)
* Use ubuntu-20.04 for the CI pipeline * Add CI pipeline to publish the Docker image
1 parent 8fb18b5 commit 47b9b6e

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Docker Image
2+
on:
3+
release:
4+
types:
5+
- published
6+
jobs:
7+
push_to_registry:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Check out the repo
11+
uses: actions/checkout@v2
12+
13+
- name: Log in to Docker Hub
14+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
15+
with:
16+
username: ${{ secrets.DOCKER_HUB_USER }}
17+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
18+
19+
- name: Extract metadata (tags, labels) for Docker
20+
id: meta
21+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
22+
with:
23+
images: alvarodelcastillo/covid19swarm
24+
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
27+
with:
28+
context: .
29+
push: true
30+
tags: ${{ steps.meta.outputs.tags }}
31+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/github-actions-tests.yml renamed to .github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: GitHub Actions Tests
1+
name: Run Tests
22
on: [push, pull_request]
33
jobs:
44
Execute-Tests:
5-
runs-on: ubuntu-latest
5+
runs-on: ubuntu-20.04
66
steps:
77
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
88
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"

0 commit comments

Comments
 (0)