Skip to content

docker: Update actions/checkout to v4 #109

docker: Update actions/checkout to v4

docker: Update actions/checkout to v4 #109

Workflow file for this run

name: Build and Push
on:
push:
branches:
- main
workflow_dispatch:
env:
# Change these values if you have forked it for your own works
# Use Lowercase vaue of your Username
GITHUB_USERNAME: sushrut1101
GITHUB_EMAIL: [email protected]
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# Image name and tag. MUST be lowercase
IMAGE_NAME: docker
jobs:
arch:
runs-on: ubuntu-latest
env:
IMAGE_TAG: arch
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configuring git
run: |
git config --global user.name $GITHUB_USERNAME
git config --global user.email $GITHUB_EMAIL
- name: Logging in to Docker
run: |
echo $GITHUB_TOKEN | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
- name: Building the Image
run: |
docker build -t ghcr.io/${GITHUB_USERNAME}/${IMAGE_NAME}:${IMAGE_TAG} -f arch/Dockerfile .
echo -e "\033[0;32m""### Build Completed Successfully!""\033[0m"
- name: Pushing the Image
run: |
docker push ghcr.io/${GITHUB_USERNAME}/${IMAGE_NAME}:${IMAGE_TAG}
fedora:
runs-on: ubuntu-latest
env:
IMAGE_TAG: latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configuring git
run: |
git config --global user.name $GITHUB_USERNAME
git config --global user.email $GITHUB_EMAIL
- name: Logging in to Docker
run: |
echo $GITHUB_TOKEN | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
- name: Building the Image
run: |
docker build -t ghcr.io/${GITHUB_USERNAME}/${IMAGE_NAME}:${IMAGE_TAG} -f fedora/Dockerfile .
echo -e "\033[0;32m""### Build Completed Successfully!""\033[0m"
- name: Pushing the Image
run: |
docker push ghcr.io/${GITHUB_USERNAME}/${IMAGE_NAME}:${IMAGE_TAG}