Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
35 changes: 22 additions & 13 deletions .github/workflows/cloud_chatops.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Cloud Chatops

permissions:
contents: read

on:
push:
branches:
Expand All @@ -17,9 +20,11 @@ jobs:
os: ['ubuntu-22.04','ubuntu-latest']
python-version: [ "3.12", "3.x" ]
steps:
- uses: actions/checkout@v6
# https://github.com/actions/checkout/releases
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
# https://github.com/actions/setup-python/releases
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand All @@ -46,7 +51,8 @@ jobs:
python3 -m pytest tests --cov-report xml:coverage.xml --cov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
# https://github.com/codecov/codecov-action/releases
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
with:
token: ${{secrets.CODECOV_TOKEN}}
files: cloud-chatops/coverage.xml
Expand All @@ -55,13 +61,15 @@ jobs:
runs-on: ubuntu-latest
needs: test_and_lint
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# https://github.com/docker/setup-buildx-action/releases
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd

- name: Login to Harbor
uses: docker/login-action@v3
# https://github.com/docker/login-action/releases
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
with:
registry: harbor.stfc.ac.uk
username: ${{ secrets.STAGING_HARBOR_USERNAME }}
Expand All @@ -72,7 +80,8 @@ jobs:
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build and push to staging project
uses: docker/build-push-action@v6
# https://github.com/docker/build-push-action/releases
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -84,13 +93,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: 'master'
path: 'main'

- name: Checkout current working branch
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
path: 'branch'

Expand All @@ -116,13 +125,13 @@ jobs:
needs: [test_and_lint, check_version_update]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd

- name: Login to Harbor
uses: docker/login-action@v3
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
with:
registry: harbor.stfc.ac.uk
username: ${{ secrets.HARBOR_USERNAME }}
Expand All @@ -141,7 +150,7 @@ jobs:
- 'cloud-chatops/version.txt'

- name: Build and push on version change
uses: docker/build-push-action@v6
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
if: steps.release_updated.outputs.version == 'true'
with:
cache-from: type=gha
Expand Down
2 changes: 1 addition & 1 deletion cloud-chatops/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cloud_chatops:
image: harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:9.1.1
image: harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:9.1.2
volumes:
- /opt/chatops/secrets.yml/:/usr/src/app/secrets.yml
- /opt/chatops/config.yml/:/usr/src/app/config.yml
Expand Down
2 changes: 1 addition & 1 deletion cloud-chatops/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.1.1
9.1.2
Loading