mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-27 05:37:15 -05:00
* Scope GitHub Actions workflow and job permissions * Fix workflow permissions gaps from least-privilege scoping
33 lines
932 B
YAML
33 lines
932 B
YAML
---
|
|
name: Push mirrored docker images
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- server/scripts/mirror-docker-images.*
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-docker:
|
|
name: cd/Push mirrored docker images
|
|
if: github.repository_owner == 'mattermost'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: cd/Login to Docker Hub
|
|
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_DEV_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_DEV_TOKEN }}
|
|
- name: cd/Run image upload script
|
|
env:
|
|
IMAGES_FILE: server/scripts/mirror-docker-images.json
|
|
DRY_RUN: no
|
|
run: ./server/scripts/mirror-docker-images.sh
|