Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub actions workflows for Docker builds #257

Merged
merged 4 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Docker
name: Docker build

on:
push:
branches-ignore:
- "carma-develop"
- "develop"
- "master"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be carma-develp?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to carma-develop

- "release/*"
pull_request:
MishkaMN marked this conversation as resolved.
Show resolved Hide resolved
types: [opened, synchronize, reopened]

jobs:
docker:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-cores
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -16,4 +20,4 @@ jobs:
- name: Build
uses: docker/build-push-action@v3
with:
context: .
context: .
29 changes: 9 additions & 20 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
name: DockerHub
name: Docker Hub build

on:
push:
branches:
- "carma-develop"
- "develop"
- "master"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be carma-develop?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to carma-develop

- "release/*"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what these lines do? Is it saying to build these branches, or ignore them? carma-develop, master, release branches we do want to build right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I got my answer in private chat from Sai:
ci.yml: it will build and run units for sonar scanner analysis but does not push any images to docker hub dockerhub.yml: it will build and push of docker images when push occurs to develop, release branches, master but doesn't run any unit test or sonar scanner docker.yml: it will only build for feature branches and Pullrequest is opened, changed , merged (edited)

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: usdotfhwastoldev/${{ github.event.repository.name }}:develop
dockerhub:
uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
Loading