Skip to content

Commit

Permalink
update release action (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Tiago Bueno <[email protected]>
  • Loading branch information
tlbueno authored Oct 31, 2024
1 parent fd9e941 commit aecf92e
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ jobs:
with:
ref: ${{ github.event.inputs.manual_branch || github.ref_name }}

- name: Install Podman
run: |
sudo apt update
sudo apt install -y podman
- name: Determine version
id: version
run: |
Expand All @@ -39,19 +34,21 @@ jobs:
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Build container image
run: |
IMAGE_TAG="toolbox:${{ env.VERSION }}"
podman build -t $IMAGE_TAG .
- name: Log in to GitHub Container Registry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "$GITHUB_TOKEN" | podman login ghcr.io -u ${{ github.actor }} --password-stdin
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: "ghcr.io/${{ github.repository_owner }}/toolbox"
tags: ${{ env.VERSION }} latest
containerfiles: |
./Containerfile
layers: true

- name: Push image to GitHub Container Registry
run: |
GITHUB_IMAGE="ghcr.io/${{ github.repository_owner }}/toolbox:${{ env.VERSION }}"
podman tag toolbox:${{ env.VERSION }} $GITHUB_IMAGE
podman push $GITHUB_IMAGE
uses: redhat-actions/push-to-registry@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: "ghcr.io"
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}

0 comments on commit aecf92e

Please sign in to comment.