forked from ClusterLabs/crmsh
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (29 loc) · 956 Bytes
/
test-container-image.yml
File metadata and controls
29 lines (29 loc) · 956 Bytes
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
name: test container CI
on:
push:
paths:
- "test_container/**"
pull_request:
paths:
- "test_container/**"
schedule:
- cron: "31 4 * * SUN"
jobs:
build:
#if: github.repository == 'ClusterLabs/crmsh' && github.ref_name == 'master'
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ./test_container
steps:
- uses: actions/checkout@v4
- name: build container image
run: podman image build -t haleap:ci .
- name: push container image
if: ${{ github.ref_name == 'master' }}
env:
DOCKER_IO_ACCESS_TOKEN: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }}
run: |
echo "$DOCKER_IO_ACCESS_TOKEN" | podman login --username ${{ vars.DOCKER_IO_USERNAME }} --password-stdin docker.io
podman image tag haleap:ci docker.io/nyang23/haleap:${{ github.ref_name }}
podman image push docker.io/nyang23/haleap:${{ github.ref_name }}