Skip to content

Commit 8c1801d

Browse files
author
scrungus
committed
only push on tags/push to master
1 parent 910acbe commit 8c1801d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/build-and-push-images.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ name: Create and publish a Docker image
22

33
on:
44
push:
5-
branches: master
5+
branches:
6+
- 'master'
7+
tags:
8+
- 'v*'
69
pull_request:
10+
branches:
11+
- 'master'
712

813
env:
914
REGISTRY: ghcr.io
@@ -21,22 +26,22 @@ jobs:
2126
uses: actions/checkout@v3
2227

2328
- name: Log in to the Container registry
24-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
29+
uses: docker/login-action@v2
2530
with:
2631
registry: ${{ env.REGISTRY }}
2732
username: ${{ github.actor }}
2833
password: ${{ secrets.GITHUB_TOKEN }}
2934

3035
- name: Extract metadata (tags, labels) for Docker
3136
id: meta
32-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
37+
uses: docker/metadata-action@v4
3338
with:
3439
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3540

3641
- name: Build and push Docker image
37-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
42+
uses: docker/build-push-action@v4
3843
with:
3944
context: .
40-
push: true
45+
push: ${{ github.event_name != 'pull_request' }}
4146
tags: ${{ steps.meta.outputs.tags }}
4247
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN apt-get update && apt-get install --yes sudo python3-dev python3-pip vim git
2525
echo "rally ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/00-rally-user && \
2626
mkdir /rally && chown -R rally:rally /rally
2727

28-
RUN pip install git+https://github.com/stackhpc/rally-openstack.git@fix-rally --no-cache-dir && \
28+
RUN pip install git+https://github.com/stackhpc/rally-openstack.git@feature/non-admin-creds --no-cache-dir && \
2929
pip3 install pymysql psycopg2-binary --no-cache-dir
3030

3131
COPY ./etc/motd_for_docker /etc/motd

0 commit comments

Comments
 (0)