-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathcontainer-push-base-images-develop.yaml
More file actions
46 lines (42 loc) · 1.46 KB
/
Copy pathcontainer-push-base-images-develop.yaml
File metadata and controls
46 lines (42 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: container-push-base-images-develop
on:
push:
branches:
- develop
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
jobs:
push-store-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: 'Check for GHCR credentials'
id: check_secrets
env:
GH_PACKAGES_USER: ${{ secrets.GH_PACKAGES_USER }}
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
run: |
if [ -z "$GH_PACKAGES_USER" ] || [ -z "$GH_PACKAGES_TOKEN" ]; then
echo "::warning title=Base images push skipped::Stratos containers are not supported at this time."
echo "secrets_available=false" >> "$GITHUB_OUTPUT"
else
echo "secrets_available=true" >> "$GITHUB_OUTPUT"
fi
- name: 'Log into GHCR'
if: steps.check_secrets.outputs.secrets_available == 'true'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{secrets.GH_PACKAGES_USER}}
password: ${{secrets.GH_PACKAGES_TOKEN}}
- name: 'Checkout current develop'
if: steps.check_secrets.outputs.secrets_available == 'true'
uses: actions/checkout@v3
with:
ref: "develop"
- name: 'Build stratos base images'
if: steps.check_secrets.outputs.secrets_available == 'true'
run: |
./deploy/stratos-base-images/build-base-images.sh -r ghcr.io -o anynines -p -s