Skip to content

How to define env variable? #68

@pascalandy

Description

@pascalandy

Hi,

I worked for few hours around the CI aspect of Github actions and the big piece that is missing is about how to define variables.

my yml

name: Docker build CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@master

      - name: Build Docker image
        run: docker build --file Dockerfile --tag devmtl/rclone:2.29.1-2019-08-24-32c812f7 .

      - name: Test docker official
        run: |
          git clone https://github.com/docker-library/official-images.git official-images
          official-images/test/run.sh devmtl/rclone:2.29.1-2019-08-24-32c812f7

what I want to do

Of course, the tag devmtl/rclone:2.29.1-2019-08-24-32c812f7 should be dynamic. I need to:

  • generate the date
  • find the hash from the actual commit

From there, I should be able to generate all the tags required.

See how I do this using Travis:
https://github.com/firepress-org/ghostfire/blob/master/.travis.yml#L45

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions