Skip to content

added additional config #4

added additional config

added additional config #4

name: Exploring Variables and Secrets

Check failure on line 1 in .github/workflows/variable-secrets.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/variable-secrets.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: deploy
on:
push
jobs:
## ENV EXAMPLE AT STEP LEVEL
## docker:
# runs-on: ubuntu-latest
# steps:
# - name: Docker Build
# env:
# CONTAINER_REGISTRY: docker.io
# DOCKER_USERNAME: siddharth1
# IMAGE_NAME: github-actions-nginx
# run: echo docker build -t ${{ env.CONTAINER_REGISTRY}}/$DOCKER_USERNAME/$IMAGE_NAME:latest
# - name: Docker Login
# env:
# DOCKER_PASSWORD: s3cUrePaSsw0rd
# DOCKER_USERNAME: siddharth1
# run: docker login --username=$DOCKER_USERNAME --password=$DOCKER_PASSWORD
# - name: Docker Publish
# env:
# CONTAINER_REGISTRY: docker.io
# DOCKER_USERNAME: siddharth1
# IMAGE_NAME: github-actions-nginx
# run: docker push docker.io/dockerUsername/imageName:latest
# deploy:
# needs: docker
# runs-on: ubuntu-latest
# steps:
# - name: Docker Run
# run: docker run -d -p 8080:80 docker.io/dockerUsername/imageName:latest
## ENV EXAMPLE AT JOB LEVEL
docker:
env:
CONTAINER_REGISTRY: docker.io
DOCKER_USERNAME: siddharth1
IMAGE_NAME: github-actions-nginx
runs-on: ubuntu-latest
steps:
- name: Docker Build
run: echo docker build -t $CONTAINER_REGISTRY/$DOCKER_USERNAME/$IMAGE_NAME:latest
- name: Docker Login
env:
DOCKER_PASSWORD: s3cUrePaSsw0rd
run: echo docker login --username=$DOCKER_USERNAME --password=$DOCKER_PASSWORD
- name: Docker Publish
run: echo docker push $CONTAINER_REGISTRY/$DOCKER_USERNAME/$IMAGE_NAME:latest
deploy:
env:
CONTAINER_REGISTRY: docker.io
DOCKER_USERNAME: siddharth1
IMAGE_NAME: github-actions-nginx
needs: docker
runs-on: ubuntu-latest