Skip to content

Commit f72e252

Browse files
authored
Add workflow for building dev images on each PR merge to devel (#13)
* Add workflow for building dev images on each PR merge to devel * Fix dates
1 parent a753df2 commit f72e252

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/devel.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
3+
name: Devel
4+
5+
on:
6+
push:
7+
branches: [devel]
8+
9+
jobs:
10+
push-development-images:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
contents: read
15+
steps:
16+
- name: Checkout ascender-operator
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
repository: ${{ github.repository_owner }}/ascender-operator
20+
path: ascender-operator
21+
22+
- name: Install playbook dependencies
23+
run: |
24+
python3 -m pip install docker
25+
26+
- name: Log into registry ghcr.io
27+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Get current date
34+
id: date
35+
uses: Kaven-Universe/github-action-current-date-time@7c1d8465d1bfd7d35466d2ee82a8e460780561ae # v1.5.0
36+
37+
- uses: benjlevesque/short-sha@dbe07338b37c456ce06d23409b35a56a7815eef4 # v4.0
38+
id: short-sha
39+
with:
40+
length: 6
41+
42+
- name: Push ascender-operator image to development registry
43+
working-directory: ascender-operator
44+
run: |
45+
BUILD_ARGS="--build-arg DEFAULT_AWX_VERSION=latest \
46+
--build-arg OPERATOR_VERSION=${{ steps.date.outputs.year }}.${{ steps.date.outputs.month }}.${{ steps.date.outputs.day }}+git${{ steps.short-sha.outputs.sha }}" \
47+
IMG=ghcr.io/${{ github.repository }}_devel:${{ steps.date.outputs.year }}.${{ steps.date.outputs.month }}.${{ steps.date.outputs.day }}+git${{ steps.short-sha.outputs.sha }} \
48+
make docker-buildx

0 commit comments

Comments
 (0)