-
Notifications
You must be signed in to change notification settings - Fork 102
52 lines (46 loc) · 1.78 KB
/
testing.yml
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
47
48
49
50
51
52
name: Testing flows
on: [push, pull_request, workflow_dispatch]
jobs:
auto-update:
runs-on: ubuntu-latest
timeout-minutes: 90
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Get Current Date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Prepare Tags
id: prep
run: |
DOCKER_OPERATOR_IMAGE=noobaa/noobaa-operator
VERSION="${{ steps.date.outputs.date }}"
echo "::warning ${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
OPERATOR_TAGS="${DOCKER_OPERATOR_IMAGE}:master-${VERSION}"
echo "::warning ${CORE_TAGS}"
echo "operatortags=${OPERATOR_TAGS}" >> $GITHUB_OUTPUT
- name: Update Core Release
id: update-release
run: |
# docker pull "noobaa/noobaa-core:master-${{ steps.prep.outputs.version }}"
docker pull "noobaa/noobaa-core:master-20201130"
echo "::found version ${{ steps.prep.outputs.version }}, updating image version"
# Update local files
sed -i 's:ContainerImageTag =.*:ContainerImageTag = master-${{ steps.prep.outputs.version }}:' pkg/options/options.go
cat pkg/options/options.go
#commit
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# git commit -m "Auto update core image" -a
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}