Skip to content

Commit

Permalink
Dev: github: add a workflow to build test container image
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Nov 4, 2024
1 parent 98c3444 commit 572e106
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test-container-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test container CI
on:
push:
paths:
- "test_container/**"
pull_request:
paths:
- "test_container/**"
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 }}

0 comments on commit 572e106

Please sign in to comment.