Skip to content
Snippets Groups Projects
Unverified Commit c54e7eb9 authored by Joel Takvorian's avatar Joel Takvorian Committed by GitHub
Browse files

Upgrade github actions (#89)

* Upgrade github actions

* Update actions/github-script@v6
parent 1db7150f
No related branches found
No related tags found
No related merge requests found
......@@ -11,9 +11,9 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Install make
......
......@@ -15,11 +15,11 @@ jobs:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: run end-to-end tests
run: make tests-e2e
- name: upload e2e test logs
......
......@@ -22,11 +22,11 @@ jobs:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: build images
run: make ci-images-build
- name: podman login to quay.io
......@@ -36,14 +36,13 @@ jobs:
password: ${{ env.REGISTRY_PASSWORD }}
registry: quay.io
- name: get short sha
id: shortsha
run: echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: push to quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE }}
tags: ${{ env.TAGS }} ${{ steps.shortsha.outputs.short_sha }}
tags: ${{ env.TAGS }} ${{ env.short_sha }}
registry: ${{ env.REGISTRY }}
- name: print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
\ No newline at end of file
......@@ -13,7 +13,7 @@ jobs:
push-pr-image:
if: ${{ github.event.label.name == 'ok-to-test' }}
name: push PR image
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.18']
......@@ -21,11 +21,11 @@ jobs:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: build images
......@@ -37,16 +37,15 @@ jobs:
password: ${{ secrets.QUAY_SECRET }}
registry: quay.io
- name: get short sha
id: shortsha
run: echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: push to quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE }}
tags: ${{ steps.shortsha.outputs.short_sha }}
tags: ${{ env.short_sha }}
registry: ${{ env.REGISTRY }}
- uses: actions/github-script@v5
- uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
......
......@@ -19,15 +19,14 @@ jobs:
go: ['1.18']
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: validate tag
id: validate_tag
run: |
tag=`git describe --exact-match --tags 2> /dev/null`
if [[ $tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$ ]]; then
echo "$tag is a valid release tag"
set -e
echo "::set-output name=tag::$tag"
echo "tag=$tag" >> $GITHUB_ENV
else
echo "$tag is NOT a valid release tag"
exit 1
......@@ -35,11 +34,11 @@ jobs:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: build images
run: SW_VERSION="${{ steps.validate_tag.outputs.tag }}" make image-build
run: SW_VERSION="${{ env.tag }}" make image-build
- name: podman login to quay.io
uses: redhat-actions/podman-login@v1
with:
......@@ -51,7 +50,7 @@ jobs:
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE }}
tags: ${{ steps.validate_tag.outputs.tag }}
tags: ${{ env.tag }}
registry: ${{ env.REGISTRY }}
- name: print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment