Skip to content

use GITHUB_ENV instead of GITHUB_STATE #12

use GITHUB_ENV instead of GITHUB_STATE

use GITHUB_ENV instead of GITHUB_STATE #12

Workflow file for this run

# Workflow for building the container
name: Build the cjpv8 container
on:
# Runs on pushes targeting docker branch
push:
branches: ["actions"]
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Login to GitHub Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/wwu-trap/cjp8:$date