Build and Push Podman Image to GitHub Packages #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Podman Image to GitHub Packages | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Podman | |
run: | | |
sudo apt update | |
sudo apt install -y podman | |
- name: Log in to GitHub Container Registry | |
env: | |
CR_PAT: ${{ secrets.PODMAN }} | |
run: | | |
echo $CR_PAT | podman login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build Podman Image | |
run: | | |
podman build -t ghcr.io/${{ github.repository_owner }}/openvpn-socks:latest . | |
- name: Push Image to GitHub Packages | |
run: | | |
podman push ghcr.io/${{ github.repository_owner }}/openvpn-socks:latest |